settings library

Settings and secrets for Tom applications: the key port for encrypted containers, the platform secret-store port, the device settings file and the one-secret bootstrap that mints its settings key, the user's identity, and the registered storage locations with forgetting one.

Platform-neutral: no dart:io, no container format and no platform plugin. An encrypted settings container, a platform secret store and a container key binding are supplied by the application.

Classes

TomDeviceSettings
The device-scoped settings file at one locator.
TomForgottenLocation
What TomLocationForgetting.forget removed.
TomGatedSecretStore
Device secrets released only after the OS's own check: Touch ID, Face ID, a fingerprint, Windows Hello, the device passcode. The OS unlock of an app keeps its unlock bundle here (part-os-unlock).
TomIdentity
The display name and stable author id used to attribute authored content.
TomInMemoryGatedSecretStore
A TomGatedSecretStore in memory, for tests: availability as set, every read answered or failed as nextFailure says, and the prompts it would have shown kept in prompts.
TomInMemoryKeyStore
Volatile TomKeyStore — keys live only for the session.
TomInMemoryLocationRegistry
A registry that remembers for the session and no longer.
TomInMemorySecretStore
Volatile TomSecretStore — secrets live only for the session.
TomKeyMaterial
The key material for one encrypted container: a passphrase, a key file, or both.
TomKeyRegistry
The keys a running session will try, by container.
TomKeyStore
Persists container keys across sessions.
TomLocationForgetting
Forgets a storage location and scrubs its traces.
TomLocationRegistry
Where the registered storage locations live.
TomLocationTraces
What forgetting a location would remove, gathered before anything is.
TomMemoryKeyRegistry
A TomKeyRegistry that holds key material and opens nothing.
TomSecretStore
Reads and writes device-local secrets by opaque handle.
TomSecretStoreAvailability
A TomSecretStore that can say beforehand whether it can be used at all (an OS keychain may be locked, absent, or unreachable from the session).
TomSettingsKeyBootstrap
Ensures this device has a key for its encrypted settings container.
TomStorageLocation
A named storage location (a repository, a folder) the user has registered.

Enums

TomGatedAvailability
What gates a TomGatedSecretStore's items on this device now.
TomGatedLifetime
How long a TomGatedSecretStore item is meant to live. The store keeps both alike; the caller deletes a session item when the session ends.
TomGatedSecretErrorKind
Why a TomGatedSecretStore call failed.
TomSecretStoreStep
Which call on a TomSecretStore failed.

Typedefs

TomSettingsKey = ({String handle, String secret})
The settings key a device holds: the secret and the handle the platform secret store keeps it under.

Exceptions / Errors

TomGatedSecretStoreException
A TomGatedSecretStore call that did not succeed. A failure is not a miss (a miss reads null), and it never carries the secret; code is the platform's own code, logged with kind and nothing else.
TomSecretStoreException
A platform secret store that could not answer.