Skip to main content

Module disk_key_locker

Module disk_key_locker 

Source
Expand description

§File-backed key locker

Persists each account’s encrypted Keys to {data_dir}/key_locker/{public_key_hex}.key using crate::tools::keys::Keys::to_persistence (passphrase-protected ChaCha20Poly1305 over an Argon2-derived key). On load, the stored passphrase unlocks the file back into an in-memory crate::client::key_locker::key_locker::KeyLocker.

A TempDirHandle fallback is used when no persistent data directory is configured, so headless tools and tests still get a functional locker with correctly-typed paths. Used by the native server binary and desktop client.

Structs§

DiskKeyLocker
A key locker that holds the signing key in memory, with persistence to disk.
DiskKeyLockerManager
File-backed key locker manager. Keys are stored as encrypted files in {data_dir}/key_locker/{public_key_hex}.key, encrypted via Keys::to_persistence().