libsodium-uwp (libsodium for Universal Windows Platform (UWP)) is a C++ Windows Runtime Component for UWP applications. This library is fully tested and executes on both Windows 10 and Windows 10 mobile.
Cryptography is hard. This library was written to make libsodium available to the .NET community building Universal Windows Applications so that developers can safely and securely implement cryptography within their application.
-
Clone this project
git clone --recursive https://github.com/charlesportwoodii/libsodium-uwp
-
Add the project solution to your project via
File->Add->Existing Project
-
Add a reference to
libsodium-uwp
by addinglibsodium-uwp\libsodium-uwp\libsodium-uwp.vcxproj
to your project references. -
Add a reference to
Visual C++ Redistributable for Visual Studio 2015
to your project.
-
Install from Nuget
Install-Package libsodium-uwp
-
Add the following to your
Package.appxmanifest
file.<Extensions> <Extension Category="windows.activatableClass.inProcessServer"> <InProcessServer> <Path>libsodium-uwp.dll</Path> <ActivatableClass ActivatableClassId="Sodium.Core" ThreadingModel="both" /> <ActivatableClass ActivatableClassId="Sodium.CryptoHash" ThreadingModel="both" /> <ActivatableClass ActivatableClassId="Sodium.GenericHash" ThreadingModel="both" /> <ActivatableClass ActivatableClassId="Sodium.GenericHashAlgorithmProvider" ThreadingModel="both" /> <ActivatableClass ActivatableClassId="Sodium.GenericHashAlgorithmNames" ThreadingModel="both" /> <ActivatableClass ActivatableClassId="Sodium.KDF" ThreadingModel="both" /> <ActivatableClass ActivatableClassId="Sodium.KeyPair" ThreadingModel="both" /> <ActivatableClass ActivatableClassId="Sodium.OneTimeAuth" ThreadingModel="both" /> <ActivatableClass ActivatableClassId="Sodium.PasswordHash" ThreadingModel="both" /> <ActivatableClass ActivatableClassId="Sodium.PublicKeyAuth" ThreadingModel="both" /> <ActivatableClass ActivatableClassId="Sodium.PublicKeyBox" ThreadingModel="both" /> <ActivatableClass ActivatableClassId="Sodium.ScalarMult" ThreadingModel="both" /> <ActivatableClass ActivatableClassId="Sodium.SealedPublicKeyBox" ThreadingModel="both" /> <ActivatableClass ActivatableClassId="Sodium.SecretBox" ThreadingModel="both" /> <ActivatableClass ActivatableClassId="Sodium.SecretKeyAuth" ThreadingModel="both" /> <ActivatableClass ActivatableClassId="Sodium.SecretAead" ThreadingModel="both" /> <ActivatableClass ActivatableClassId="Sodium.SecretStream" ThreadingModel="both" /> <ActivatableClass ActivatableClassId="Sodium.ShortHash" ThreadingModel="both" /> <ActivatableClass ActivatableClassId="Sodium.StreamEncryption" ThreadingModel="both" /> <ActivatableClass ActivatableClassId="Sodium.Utilities" ThreadingModel="both" /> </InProcessServer> </Extension> </Extensions>
See the docs folder for complete documentation on how to use this library.
libsodium
requires the Visual C++ Redistributable for Visual Studio 2015.
This library is currently a work in progress. While many libsodium functions are implemented, not are all. See the docs folder for more information. Also see the releases page for more information and details as to what is available on Nuget, as the master
branch may be ahead of what is available there.
NaCl has been released to the public domain to avoid copyright issues. libsodium is subject to the ISC license, and this software is subject to the BSD-3 Clause License (see LICENSE.md).