Trait SecretStore

Source
pub trait SecretStore {
    // Required methods
    fn get(&self) -> Result<SecretKey>;
    fn save(&self, secret_key: &SecretKey) -> Result<()>;
    fn generate(rng: impl CryptoRngCore) -> Result<PublicKey>;
}
Expand description

A simple secret store to manage iroh::SecretKey

Required Methods§

Source

fn get(&self) -> Result<SecretKey>

Get the secret key from the underlying store

Source

fn save(&self, secret_key: &SecretKey) -> Result<()>

Save the secret key to the underlying store

Source

fn generate(rng: impl CryptoRngCore) -> Result<PublicKey>

Generate a new secret key and save it to the underlying store returns the public key portion

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§