DVAppKeyCipher class
AES-256-GCM over the application key.
Encryption happens before a value reaches any backing store, so the store
is a dumb byte sink on every target — one code path and one threat model,
rather than depending on encrypted preferences on one platform and
localStorage, which has no encryption story at all, on another.
Constructors
- DVAppKeyCipher(Uint8List _key, {Random? random})
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(
String ciphertext) → String? - Returns null when the value cannot be read — a rotated key, a reset keychain, a profile moved between machines, or a tampered value.
-
encrypt(
String plaintext) → String -
Encrypts
plaintext, returningdv1:<base64 nonce||ciphertext>. -
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
- macBits → const int
- nonceBytes → const int
- 96 bits, the nonce size AES-GCM is specified for.