get_x_storage_secure library

Classes

AndroidVaultOptions
Options that only make sense on Android.
AppleVaultOptions
Options that only make sense on iOS and macOS.
SecretVault
Stores a small secret so that it is protected by the operating system and never written to disk in plaintext.
SecureStorage
A string key–value store whose values live in the operating system's own secret store, on top of SecretVault.
SecureStorageChange
One entry of SecureStorage.changes. Names the change, never the value.
VaultOptions
Per-platform knobs for one vault, resolved by createPlatformVault.
WindowsVaultOptions
Options that only make sense on Windows.

Enums

AppleAccessibility
Keychain accessibility classes an Apple vault may request.
AppleAuthentication
How strongly an Apple item is gated on the user.
SecureStorageChangeKind
Whether a key gained or lost its value.

Constants

kDefaultAuthenticationTimeoutSeconds → const int
Window that both gated backends accept, in seconds.
kDefaultVaultNamespace → const String
Namespace used when the caller does not supply one.
kMaxConfigurableVaultSecretBytes → const int
Upper bound for a vault created with a larger SecretVault.maxSecretBytes.
kMaxVaultSecretBytes → const int
Largest secret a vault accepts unless its host app raises the cap.

Functions

createPlatformVault({String namespace = kDefaultVaultNamespace, VaultOptions options = const VaultOptions()}) → SecretVault
Creates the vault backed by the operating system's secret store.

Exceptions / Errors

VaultAuthenticationRequiredException
Thrown when a secret is protected by user authentication and the OS has not seen any recently: the caller can authenticate (device unlock, biometric prompt) and retry the same call.
VaultOperationException
Thrown when a single operation failed on an otherwise usable store.
VaultUnavailableException
Thrown when the platform secret store is missing entirely or refuses to be used at all (no Keychain daemon, no Android keystore provider, libsecret not installed, no Secret Service on D-Bus).