sodium library

Classes

Aead
A meta class that provides access to all libsodium aead APIs.
Auth
A meta class that provides access to all libsodium auth APIs.
Box
A meta class that provides access to all libsodium box APIs.
Crypto
A meta class that provides access to all libsodium crypto APIs.
DetachedCipherResult
The result of a detached cipher operation. It consists of the actual cipherText as well as the mac.
GenericHash
A meta class that provides access to all libsodium generichash APIs.
GenericHashConsumer
A typed StreamConsumer, which is used to generate a hash from a stream of data.
Kdf
A meta class that provides access to all libsodium kdf APIs.
KeyPair
A pair of keys that belong together. Consists of a secretKey as well as the corresponding publicKey.
Kx
A meta class that provides access to all libsodium kx APIs.
PrecalculatedBox
A meta class that provides access to all libsodium box APIs working with precalculated key.
Randombytes
A meta class that provides access to all libsodium randombytes APIs.
SecretBox
A meta class that provides access to all libsodium secretbox APIs.
SecretExStream<T>
Extended secret Stream that provides a way to rekey the stream.
SecretExStreamTransformer<TIn, TOut>
Extended secret StreamTransformer that provides a way to rekey the stream.
SecretStream
A meta class that provides access to all libsodium secretstream APIs.
SecretStreamCipherMessage
A container class for a extended cipher message before decryption.
SecretStreamPlainMessage
A container class for a extended plain message before encryption.
SecureKey
A platform independent secure key, that uses native memory.
SessionKeys
A pair of session keys that can be used for secure data transfer.
ShortHash
A meta class that provides access to all libsodium shorthash APIs.
Sign
A meta class that provides access to all libsodium sign APIs.
SignatureConsumer
A typed StreamConsumer, which is used to generate a signature from a stream of data.
Sodium
A meta class that provides access to all toplevel libsodium API groups.
SodiumInit
Static class to obtain a Sodium instance.
SodiumVersion
A Version number class that provides the libsodium implementation version.
TransferrableKeyPair
A helper class that represents a boxed key pair that can be transferred via isolates.
TransferrableSecureKey
A helper class that represents a boxed secure key that can be transferred via isolates.
VerificationConsumer
A typed StreamConsumer, which is used to verify a signature from a stream of data.

Enums

SecretStreamMessageTag
Enum type for the different tags that can be passed to sent messages.

Extensions

Int8ListX on Int8List
Extensions on Int8List
SecureKeySplit on SecureKey
Extensions on SecureKey
StringX on String
Extensions on String
Uint8ListX on Uint8List
Extensions on Uint8List

Typedefs

SecureCallbackFn<T> = T Function(Uint8List data)
A callback function to operate on an unlocked key.
SodiumFactory = Future<Sodium> Function()
A factory method that creates new Sodium instances. This factory can be passed between isolates and can be used if custom isolate handling is required.
SodiumIsolateCallback<T> = FutureOr<T> Function(Sodium sodium, List<SecureKey> secureKeys, List<KeyPair> keyPairs)
A callback to be executed on a separate isolate.

Exceptions / Errors

InvalidHeaderException
Exception that gets thrown if a decryption stream receives an invalid header.
SodiumException
Exception that is thrown if a lowlevel libsodium operation fails.
StreamClosedEarlyException
Exception that gets thrown if a decryption stream gets closed too early.