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

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

Get the attributes for a secret

Return the associated public key given the secret key

Remove a secret from the vault

Implementors