SodiumHiveLocalStorage constructor
SodiumHiveLocalStorage({})
Constructor.
Both sodium
and encryptionKey
are required to initialize the storage,
as the storage will always be encrypted. You can use
SodiumHiveCipher.keyBytes to create a SecureKey
of the correct length.
The hive
, baseDirFn
and clear
are simply forwarded to the
HiveLocalStorage.new
constructor.
Implementation
SodiumHiveLocalStorage({
required HiveInterface hive,
required Sodium sodium,
required SecureKey encryptionKey,
FutureOr<String> Function()? baseDirFn,
bool? clear,
}) : _sodiumHiveCipher = _FakeAesSodiumHiveCipher(
sodium: sodium,
encryptionKey: encryptionKey,
),
super(
hive: hive,
baseDirFn: baseDirFn,
clear: clear,
);