Provides modern cryptographic algorithm implementations for .NET based on libsodium. Commonly Used Types: NSec.Cryptography.Aegis256 NSec.Cryptography.Argon2id NSec.Cryptography.Blake2b NSec.Cryptography.Chacha20Poly1305 NSec.Cryptography.Ed25519 NSec.Cryptography.X25519
$ dotnet add package NSec.CryptographyNSec is a cryptographic library for .NET based on libsodium. It aims to be easy to use, secure by default, fast, and agile.
To get started with NSec, install the package via NuGet:
dotnet add package NSec.Cryptography
For more detailed documentation, usage examples, and API references, please visit the project homepage.
| Class | Algorithms |
|---|---|
| AeadAlgorithm Class | AEGIS-128L |
| AEGIS-256 | |
| AES256-GCM | |
| ChaCha20-Poly1305 | |
| XChaCha20-Poly1305 | |
| HashAlgorithm Class | BLAKE2b (unkeyed) |
| SHA-256 | |
| SHA-512 | |
| KeyAgreementAlgorithm Class | X25519 |
| KeyDerivationAlgorithm2 Class | HKDF-SHA-256 |
| HKDF-SHA-512 | |
| MacAlgorithm Class | BLAKE2b (keyed) |
| HMAC-SHA-256 |
| HMAC-SHA-512 |
| PasswordBasedKeyDerivationAlgorithm Class | Argon2id |
| scrypt |
| SignatureAlgorithm Class | Ed25519 |
| SignatureAlgorithm2 Class | Ed25519ph |
See the API reference for more information.
NSec is intended to run on the following platforms. Please note, not all of these platforms have been tested.
-x64 | -x86 | -arm64 | -arm | |
|---|---|---|---|---|
android- | ||||
ios- | ✓ | |||
linux- | ✓ | ✓ | ✓ | |
linux-musl- | ✓ | ✓ | ✓ | |
maccatalyst- | ✓ | ✓ | ||
osx- | ✓ | ✓ | ||
tvos- | ✓ | |||
win- | ✓ | ✓ | ✓ |
See the installation instructions for more information, particularly regarding hardware and software requirements.