CryptoHelper class

Constructors

CryptoHelper()

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

decrypt({required String 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 String 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.
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

Constants

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