Trait ockam_core::vault::SecretVault
source ·
[−]pub trait SecretVault {
fn secret_generate<'life0, 'async_trait>(
&'life0 mut self,
attributes: SecretAttributes
) -> Pin<Box<dyn Future<Output = Result<Secret>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn secret_import<'life0, 'life1, 'async_trait>(
&'life0 mut self,
secret: &'life1 [u8],
attributes: SecretAttributes
) -> Pin<Box<dyn Future<Output = Result<Secret>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn secret_export<'life0, 'life1, 'async_trait>(
&'life0 mut self,
context: &'life1 Secret
) -> Pin<Box<dyn Future<Output = Result<SecretKey>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn secret_attributes_get<'life0, 'life1, 'async_trait>(
&'life0 mut self,
context: &'life1 Secret
) -> Pin<Box<dyn Future<Output = Result<SecretAttributes>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn secret_public_key_get<'life0, 'life1, 'async_trait>(
&'life0 mut self,
context: &'life1 Secret
) -> Pin<Box<dyn Future<Output = Result<PublicKey>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn secret_destroy<'life0, 'async_trait>(
&'life0 mut self,
context: Secret
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
}
Expand description
Secret
-management functionality
Required methods
fn secret_generate<'life0, 'async_trait>(
&'life0 mut self,
attributes: SecretAttributes
) -> Pin<Box<dyn Future<Output = Result<Secret>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn secret_generate<'life0, 'async_trait>(
&'life0 mut self,
attributes: SecretAttributes
) -> Pin<Box<dyn Future<Output = Result<Secret>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Generate fresh secret with given attributes
Import a secret with given attributes from binary form into the vault
Export a secret key to the binary form represented as SecretKey
fn secret_attributes_get<'life0, 'life1, 'async_trait>(
&'life0 mut self,
context: &'life1 Secret
) -> Pin<Box<dyn Future<Output = Result<SecretAttributes>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn secret_attributes_get<'life0, 'life1, 'async_trait>(
&'life0 mut self,
context: &'life1 Secret
) -> Pin<Box<dyn Future<Output = Result<SecretAttributes>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Get the attributes for a secret
Return the associated public key given the secret key