Trait ockam_core::vault::SecretVault
source · pub trait SecretVault {
// Required methods
fn secret_generate<'life0, 'async_trait>(
&'life0 self,
attributes: SecretAttributes
) -> Pin<Box<dyn Future<Output = Result<KeyId>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn secret_import<'life0, 'async_trait>(
&'life0 self,
secret: Secret,
attributes: SecretAttributes
) -> Pin<Box<dyn Future<Output = Result<KeyId>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn secret_export<'life0, 'life1, 'async_trait>(
&'life0 self,
key_id: &'life1 KeyId
) -> Pin<Box<dyn Future<Output = Result<Secret>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn secret_attributes_get<'life0, 'life1, 'async_trait>(
&'life0 self,
key_id: &'life1 KeyId
) -> Pin<Box<dyn Future<Output = Result<SecretAttributes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn secret_public_key_get<'life0, 'life1, 'async_trait>(
&'life0 self,
key_id: &'life1 KeyId
) -> Pin<Box<dyn Future<Output = Result<PublicKey>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn secret_destroy<'life0, 'async_trait>(
&'life0 self,
key_id: KeyId
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Defines the Secret
management interface for Ockam Vaults.
Examples
See ockam_vault::vault::Vault
for a usage example.
Required Methods§
sourcefn secret_generate<'life0, 'async_trait>(
&'life0 self,
attributes: SecretAttributes
) -> Pin<Box<dyn Future<Output = Result<KeyId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn secret_generate<'life0, 'async_trait>( &'life0 self, attributes: SecretAttributes ) -> Pin<Box<dyn Future<Output = Result<KeyId>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Generate a fresh secret with the given attributes.
sourcefn secret_import<'life0, 'async_trait>(
&'life0 self,
secret: Secret,
attributes: SecretAttributes
) -> Pin<Box<dyn Future<Output = Result<KeyId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn secret_import<'life0, 'async_trait>( &'life0 self, secret: Secret, attributes: SecretAttributes ) -> Pin<Box<dyn Future<Output = Result<KeyId>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Import a secret with the given attributes from binary form into the vault.
sourcefn secret_export<'life0, 'life1, 'async_trait>(
&'life0 self,
key_id: &'life1 KeyId
) -> Pin<Box<dyn Future<Output = Result<Secret>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn secret_export<'life0, 'life1, 'async_trait>( &'life0 self, key_id: &'life1 KeyId ) -> Pin<Box<dyn Future<Output = Result<Secret>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Export a secret key to the binary form represented as Secret
.
sourcefn secret_attributes_get<'life0, 'life1, 'async_trait>(
&'life0 self,
key_id: &'life1 KeyId
) -> Pin<Box<dyn Future<Output = Result<SecretAttributes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn secret_attributes_get<'life0, 'life1, 'async_trait>( &'life0 self, key_id: &'life1 KeyId ) -> Pin<Box<dyn Future<Output = Result<SecretAttributes>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Return the attributes for a secret.