Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which libsodium .NET wrapper to use when building cross platform apps using Xamarin in Visual Studio?

I am very interested in mobile app development using Xamarin. To provide secure communication I would like to use NaCl or more specific: libsodium.
On the libsodium website it says that there are three options to use libsodium with C#: libsodium-net, NSec and NitraLibSodium
My question: Which is the best wrapper to build mobile apps? What are the disadvantages and the advantages?

Thank you.

like image 858
LeWimbes Avatar asked Sep 09 '18 11:09

LeWimbes


1 Answers

Before you are able to decide which of these libraries you would like to use, you need to decide the version of .NET that you will be using for your Xamarin project.

These packages have different dependencies, but will all ultimately need to be imported as a NuGet Package, from there you can use like any other NuGet package in your C# project.

For what it's worth, the one that looks most mature and has active development is NSec, so if you're planning on building on the latest .NET standard that is the one I would go with.

As far as the pros and cons of each related to its implementation of libsodium, I'll have to leave that answer up to someone else as I am not familiar with NaCl.

Hope this helps.

like image 91
Garrett Manley Avatar answered Sep 19 '22 20:09

Garrett Manley