Skip to main content

SecretStore

Trait SecretStore 

Source
pub trait SecretStore {
    // Required methods
    fn put(&self, key: &str, value: &[u8]) -> Result<()>;
    fn get(&self, key: &str) -> Result<Option<Zeroizing<Vec<u8>>>>;
    fn delete(&self, key: &str) -> Result<()>;
}
Expand description

Key-value store for secret blobs. Implementations must keep values confidential (e.g. iOS Keychain with kSecAttrAccessibleWhenUnlockedThisDeviceOnly).

Required Methods§

Source

fn put(&self, key: &str, value: &[u8]) -> Result<()>

Source

fn get(&self, key: &str) -> Result<Option<Zeroizing<Vec<u8>>>>

Source

fn delete(&self, key: &str) -> Result<()>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§