flutter_data_sodium library

Classes

KeyInfo
Provides a keyId and a secureKey pair.
KeyManager
An abstract class to generate keys for encryption based on a single master key.
MasterKeyComponents
A collection of properties that are used to generate a master key.
PassphraseBasedKeyManager
An extension of the standard KeyManager that generates it's master key based of a passphrase.
SodiumHiveCipher
An implementation of HiveCipher that uses the SecretBox for encryption.
SodiumHiveLocalStorage
A customization of HiveLocalStorage that uses SodiumHiveCipher instead of HiveAesCipher for local encryption.

Mixins

ParallelMasterKeyComputation
A mixin on PassphraseBasedKeyManager to allow key derivation in an isolate.
SodiumRemoteAdapter<T extends DataModel<T>>
A special RemoteAdapter that adds an End-To-End-Encryption layer to all your requests.

Extensions

SodiumUuid on Sodium
An extension on Sodium that provides a Uuid instances that uses Randombytes to securely generate truly random UUIDs.

Functions

configureRepositoryLocalStorageSodium({required CreateFn<Sodium> sodium, required CreateFn<SecureKey> encryptionKey, required FutureFn<String> baseDirFn, bool? clear}) → Override
Creates an override for hiveLocalStorageProvider using sodium encryption.

Typedefs

ComputeCallback<Q, R> = FutureOr<R> Function(Q message)
A method to be executed asynchronously
CreateFn<T> = T Function(Ref<Object?> ref)
A generic function that creates an instance of T using a ref.
CreateSodiumFn = FutureOr<Sodium> Function()
An asynchronous static or top level method that returns a sodium instance.
UuidGrngFn = Uint8List Function()
A callback that will generate 16 bytes of random data.