SecureStorage class

A utility class for securely storing encryption keys.

Constructors

SecureStorage.new({FlutterSecureStorage? secureStorage})
Creates a new instance of SecureStorage.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

deleteKey({String? keyName}) Future<void>
Deletes an encryption key from secure storage.
deriveAndStoreKey({required String password, String? keyName, EncryptionAlgorithm algorithm = EncryptionAlgorithm.aes256, int iterations = 10000}) Future<EncryptionOptions>
Derives a key from a password and stores it in secure storage.
generateAndStoreKey({String? keyName, EncryptionAlgorithm algorithm = EncryptionAlgorithm.aes256}) Future<EncryptionOptions>
Generates a secure random key and stores it in secure storage.
getEncryptionOptions({String? keyName}) Future<EncryptionOptions?>
Retrieves encryption options from secure storage.
hasKey({String? keyName}) Future<bool>
Checks if an encryption key exists in secure storage.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited