InMemoryAtKeysIo class
Stores AtKeys in process memory, for tests.
⚠️ Nothing it holds survives the process, so an application never runs a client on it. A client files key material into its keyfile that exists nowhere else: a fully privileged client at a post-quantum posture mints the atSign's signing root there, and a root whose private key is lost can never be replaced. Keep an application's keys in a durable WrittenAtKeysIo, such as FileAtKeysIo. A subclass escapes the analyzer's warning, not this.
- Inheritance
-
- Object
- AtKeysIo
- WrittenAtKeysIo
- InMemoryAtKeysIo
Constructors
- InMemoryAtKeysIo()
- InMemoryAtKeysIo.holding(String atsign, AtKeys atKeys)
-
An in-memory store already holding
atKeysforatsign.factory
Properties
- assurance → AtKeysAssurance
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- passphraseCodec → AtKeysPassphraseEnvelopeCodec
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkWritable(
String atsign) → Future< void> -
Throws unless write could create
atsign's keys in this store now; the default checks nothing.inherited -
describeSource(
String atsign) → String -
Where
atsign's keys are kept, in words a message shows in brackets after "the AtKeys store", such as a keyfile's path or "this device's keychain", or empty when the store has nothing more specific to say.inherited -
flush(
Atsign atsign, AtKeys atKeys) → FutureOr< void> -
Literal mirror to write as there is no need to flush to memory.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
String atsign) → FutureOr< AtKeys> -
Returns the keys for
atsign, or throws if nothing has been loaded into memory for that atsign.override -
toString(
) → String -
A string representation of this object.
inherited
-
update(
Atsign atsign, FutureOr< bool> mutate(AtKeys keys)) → Future<void> -
Reads
atsign's keys, appliesmutateto them, and persists the result — as one operation.inherited -
write(
String atsign, AtKeys atKeys) → Future< void> -
Create-only, like every WrittenAtKeysIo.write: throws
AtKeysFileOverwriteExceptionwhen keys foratsignare already loaded. Use flush (or update) for later mutations.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited