DVAppKey class

The application key: generated once per install and per user, used to encrypt what Dartvel stores at rest on a device.

Distinct from the server-held secrets in DV.Secrets, which encrypt model fields in a database. These are two keys with two threat models, and conflating them is how a device key ends up on a server or a server key in a bundle.

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 Methods

ensure(DVAppKeyStore store, {Random? random}) → Future<Uint8List>
Returns the stored key, generating one on first use.
generate({Random? random}) → Uint8List
A fresh key. Uses Random.secure unless a source is supplied, which only tests should do.
rotate(Map<String, String> values, {required Uint8List from, required Uint8List next}) → Map<String, String>
Re-encrypts values under next, returning the rewritten entries.

Constants

lengthBytes → const int