Namespace LibSodium
Classes
- Aegis128L
Provides high-level access to the AEGIS-128L AEAD construction from Libsodium.
- Aegis256
Provides high-level access to the AEGIS-256 AEAD construction from Libsodium.
- Aes256Gcm
Provides high-level access to the AES256-GCM AEAD construction from Libsodium.
- Base64Encoding
Provides methods for Base64 encoding and decoding.
- ChaCha20Poly1305
Provides high-level access to the ChaCha20-Poly1305 AEAD construction from Libsodium.
- ChaCha20Poly1305Ietf
Provides high-level access to the IETF variant of the ChaCha20-Poly1305 AEAD construction from Libsodium.
- CryptoAuth
Provides methods for message authentication using the crypto_auth API from libsodium.
- CryptoBox
Provides high-level access to the Curve25519-based public-key authenticated encryption (crypto_box) from Libsodium.
- CryptoGenericHash
Provides a high-level interface to the libsodium generic hash function, based on BLAKE2b.
- CryptoHChaCha20
Deterministically derives 32-byte subkeys using the HChaCha20 core function from a key, a salt-like input and optional domain context.
- CryptoHkdf
Provides HKDF key derivation (RFC 5869) using SHA-256 or SHA-512.
- CryptoHmacSha256
Computes and verifies HMAC-SHA-256 message authentication codes.
- CryptoHmacSha512
Computes and verifies HMAC-SHA-512 message authentication codes.
- CryptoHmacSha512_256
Computes and verifies HMAC-SHA-512/256 message authentication codes.
- CryptoKeyDerivation
Provides deterministic key derivation using libsodium's crypto_kdf_* API, based on the BLAKE2b hash function.
- CryptoKeyExchange
Provides methods for secure, fast, and simple key exchange using libsodium's crypto_kx API. Allows two parties to derive shared session keys securely.
- CryptoOneTimeAuth
Computes and verifies Poly1305 one-time authentication codes.
- CryptoPasswordHashArgon
Provides password hashing and key derivation using Argon2.
- CryptoPasswordHashScrypt
Provides password hashing and key derivation using the Scrypt algorithm.
- CryptoRistretto
Constants and cryptographic operations for the Ristretto255 group.
- CryptoScalarMult
Provides low-level scalar multiplication on Curve25519. This class exposes the
crypto_scalarmult
andcrypto_scalarmult_base
functions from libsodium.
- CryptoSecretStream
The CryptoSecretStream class provides methods for performing authenticated encryption and decryption of data streams, with optional additional authenticated data. It is based on the XChaCha20-Poly1305 algorithm.
- CryptoSha256
Provides one‑shot and streaming SHA‑256 hashing helpers built on libsodium’s
crypto_hash_sha256
API.
- CryptoSha512
Provides one‑shot and streaming SHA‑512 hashing helpers built on libsodium’s
crypto_hash_sha512
API.
- CryptoShortHash
Provides a high-level interface to the libsodium short-input hash function, based on SipHash-2-4.
- CryptoSign
Provides digital signature functionality using Ed25519, as implemented by libsodium.
- CryptoStreamChaCha20
Provides high-level access to the
ChaCha20
stream cipher.
- CryptoStreamChaCha20Ietf
Provides high-level access to the
ChaCha20Ietf
stream cipher.
- CryptoStreamSalsa20
Provides high-level access to the
Salsa20
stream cipher.
- CryptoStreamXChaCha20
Provides high-level access to the
XChaCha20
stream cipher.
- CryptoStreamXSalsa20
Provides high-level access to the
XSalsa20
stream cipher.
- HexEncoding
Provides methods for encoding and decoding hexadecimal strings and byte buffers.
- LibSodiumException
Represents errors that occur during Sodium operations.
- LibraryInitializer
Static class that manages the initialization and configuration of libsodium.
- LibraryVersion
Provides methods to retrieve the version information of the Sodium library.
- RandomGenerator
Static class for random number generation.
- SecretBox
Provides static methods for authenticated symmetric encryption and decryption using the Sodium secretbox primitives, specifically the XSalsa20 stream cipher and Poly1305 MAC for authentication. These methods offer combined encryption/authentication and detached encryption/authentication, with variations for handling nonces and Message Authentication Codes (MACs) within or separate from the ciphertext.
- SecretStream
Provides high-level, stream-based authenticated encryption and decryption using the XChaCha20-Poly1305 algorithm. This class abstracts the complexity of securely processing large data streams, including chunking, authentication, and cryptographic state management.
- SecureBigUnsignedInteger
Provides methods for working with arbitrary large little endian big unsigned integers in a secure way (constant time for a given length)
- SecureMemory
Provides methods for secure memory management using libsodium. These methods help protect sensitive data from being swapped to disk or accessed by other processes.
- SecureMemory<T>
Provides a secure unmanaged memory buffer for unmanaged types, using libsodium for memory protection. This class encapsulates secure memory allocation, read-only protection, and zeroing.
- SecurePadding
Provides methods for padding and unpadding byte buffers to ensure they meet specified block sizes.
- UnmanagedMemorySpanHolder<T>
Holds the pointer and length of an unmanaged memory span for later recreation. Use only with unmanaged memory.
- XChaCha20Poly1305
Provides high-level access to the XChaCha20-Poly1305 AEAD construction from Libsodium.
Interfaces
- ICryptoIncrementalOperation
Represents an incremental operation such as incremental hash, MAC, or sign calculation that processes data in chunks and produces a fixed-size output.
Enums
- Base64Variant
Represents Base64 encoding variants.
- CryptoSecretStreamTag
The tags used in the secret stream.
- PasswordHashArgonAlgorithm
Supported password hashing algorithms.