EncryptHelper class

Allow to encrypt/decrypt data before encodingKey MUST be set before using the class

If no field is marked as encrypted in the TableInfo data no encryption is applied

Constructors

EncryptHelper()

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

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

Static Properties

iv → IV
final
secretKey ↔ String?
getter/setter pair

Static Methods

convertPinToSecretKey(String pin) → String
Simplify the creation of a secret key by generating one starting from a PIN
decrypt(String? encryptedString) → String?
Decrypt a value by using the secret key stored in the DB
decryptPassword(String? password) → String?
Decrypt a password that may have {AES} prefix marker. No prefix means plaintext (legacy data).
encrypt(String? sourceString) → String?
Encrypt a value by using the secret key stored in the DB
encryptPassword(String? password) → String?
Encrypt a password with {AES} prefix marker. No prefix means plaintext (backward compatible). Uses a dedicated key independent of the field-encryption secretKey.
generateSecretKey() → String
Returns a new AES key to be used to encode/decode