Trait ockam_vault_core::SecretVault [−][src]
pub trait SecretVault: Zeroize { fn secret_generate(
&mut self,
attributes: SecretAttributes
) -> Result<Secret>; fn secret_import(
&mut self,
secret: &[u8],
attributes: SecretAttributes
) -> Result<Secret>; fn secret_export(&mut self, context: &Secret) -> Result<SecretKey>; fn secret_attributes_get(
&mut self,
context: &Secret
) -> Result<SecretAttributes>; fn secret_public_key_get(&mut self, context: &Secret) -> Result<PublicKey>; fn secret_destroy(&mut self, context: Secret) -> Result<()>; }
Expand description
Secret
-management functionality
Required methods
fn secret_generate(&mut self, attributes: SecretAttributes) -> Result<Secret>
fn secret_generate(&mut self, attributes: SecretAttributes) -> Result<Secret>
Generate fresh secret with given attributes
fn secret_import(
&mut self,
secret: &[u8],
attributes: SecretAttributes
) -> Result<Secret>
fn secret_import(
&mut self,
secret: &[u8],
attributes: SecretAttributes
) -> Result<Secret>
Import a secret with given attributes from binary form into the vault
fn secret_export(&mut self, context: &Secret) -> Result<SecretKey>
fn secret_export(&mut self, context: &Secret) -> Result<SecretKey>
Export a secret key to the binary form represented as SecretKey
fn secret_attributes_get(
&mut self,
context: &Secret
) -> Result<SecretAttributes>
fn secret_attributes_get(
&mut self,
context: &Secret
) -> Result<SecretAttributes>
Get the attributes for a secret
fn secret_public_key_get(&mut self, context: &Secret) -> Result<PublicKey>
fn secret_public_key_get(&mut self, context: &Secret) -> Result<PublicKey>
Return the associated public key given the secret key
fn secret_destroy(&mut self, context: Secret) -> Result<()>
fn secret_destroy(&mut self, context: Secret) -> Result<()>
Remove a secret from the vault