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>[src]

Generate fresh secret with given attributes

fn secret_import(
    &mut self,
    secret: &[u8],
    attributes: SecretAttributes
) -> Result<Secret>
[src]

Import a secret with given attributes from binary form into the vault

fn secret_export(&mut self, context: &Secret) -> Result<SecretKey>[src]

Export a secret key to the binary form represented as SecretKey

fn secret_attributes_get(
    &mut self,
    context: &Secret
) -> Result<SecretAttributes>
[src]

Get the attributes for a secret

fn secret_public_key_get(&mut self, context: &Secret) -> Result<PublicKey>[src]

Return the associated public key given the secret key

fn secret_destroy(&mut self, context: Secret) -> Result<()>[src]

Remove a secret from the vault

Implementors