secure_store library

Classes

BiometricsStore
Stores secrets encrypted with biometric authentication when available.
PasswordStore
A SecureStore that stores the private key encrypted with a password.
SecureStore

Extensions

SecureStoreExt on SecureStore

Constants

ivLength → const int
Length of the initialization vector used by AES 256 GCM.

Functions

decrypt({required Uint8List password, required Uint8List encryptedSecret}) Uint8List
Decrypt encryptedSecret with AES 256 GCM using password. The IV will be read from the beginning of encryptedSecret.
encrypt({required Uint8List password, Uint8List? iv, required Uint8List secret}) Uint8List
Encrypt secret with AES 256 GCM using password and iv. If iv is not provided, a random IV will be generated using getIV. The returned Uint8List is the concatenation of the IV and the secret.
getIV() Uint8List
Generates a random IV (Initialization Vector) for AES 256 GCM. Initialization Vector: 16 bytes to make each encryption unique. IV will be included at the beginning of the encrypted message to be able to decrypt it.