PasskeyVault class
The passkey-derived identity of one atSign on one device: the record id and pointer namespace, a sealer for its records, and the seed of its APKAM signing key.
Built from a PasskeyDerivation. close marks the vault closed at once: sealing, opening and reading the seed afterwards throw StateError. The auth seed is wiped and the sealer closed when no withAuthSeed use is still running, so a use that began before close finishes with the intact seed. Only the buffers the vault holds are wiped.
Constructors
- PasskeyVault(PasskeyDerivation derivation, {required String atSign})
-
Takes ownership of
derivation's auth seed and sealer, for theatSignit was derived for, which the vault holds in canonical form.
Properties
- atSign → String
-
The canonical atSign this vault belongs to; its records open for this
atSign only.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- lookupHex → String
-
64 lowercase hex characters naming the record
public:_<lookupHex>.<ns>@<atSign>.final - ns → String
-
64 lowercase hex characters naming the namespace of this passkey's
pointer.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → void - Marks the vault closed, then wipes the auth seed and closes the sealer once no withAuthSeed use is running (at once when none is). Safe to call again.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
open(
PasskeyRecordType typ, String record) → Future< Map< String, dynamic> > -
The document in
record, opened as typetyp. -
seal(
PasskeyRecordType typ, Map< String, dynamic> document) → Future<String> -
documentof typetypsealed as a record's JSON text. -
toString(
) → String -
A string representation of this object.
inherited
-
wipeAuthSeed(
) → void - Overwrites the auth seed with zeroes, as soon as no withAuthSeed use is running, and refuses later uses. Sealing and opening keep working until close. Safe to call again.
-
withAuthSeed<
T> (Future< T> use(Uint8List seed)) → Future<T> -
Runs
usewith the 32-byte auth seed;usemust not keep it. A close duringusedoes not touch the seed untilusecompletes, after which the seed is overwritten with zeroes.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited