isSupported | isSupported(): boolean | boolean | Public method isSupported. |
initWithPassphrase | initWithPassphrase(passphrase: string, explicitSalt?: string): Promise<void> | Promise<void> | Initializes the service with a passphrase-derived key (PBKDF2 + AES-GCM).
The salt is automatically persisted in storage on first call and reused on subsequent calls.
Calling this again replaces the active key. |
set | set(key: string, value: T, namespace?: string): Promise<void> | Promise<void> | Encrypts and stores a value.
A fresh random IV is generated for every write. |
get | get(key: string, namespace?: string): Promise<T | null> | Promise<T | null> | Decrypts and returns a stored value.
Returns `null` if the key does not exist, was written without encryption,
or the ciphertext is corrupted. |
remove | remove(key: string, namespace?: string): void | void | Removes a single entry from storage. |
clear | clear(namespace?: string): void | void | Clears all entries belonging to a namespace.
When called without arguments, clears the entire storage target. |