pub trait PassphraseCache: Send + Sync {
// Required methods
fn store(
&self,
alias: &str,
passphrase: &str,
stored_at_unix: i64,
) -> Result<(), AgentError>;
fn load(
&self,
alias: &str,
) -> Result<Option<(Zeroizing<String>, i64)>, AgentError>;
fn delete(&self, alias: &str) -> Result<(), AgentError>;
}Expand description
Trait for storing/retrieving passphrases in the OS keychain.
Required Methods§
Sourcefn store(
&self,
alias: &str,
passphrase: &str,
stored_at_unix: i64,
) -> Result<(), AgentError>
fn store( &self, alias: &str, passphrase: &str, stored_at_unix: i64, ) -> Result<(), AgentError>
Store a passphrase for the given alias.