1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use crate::secret::Secret;
use crate::types::{PublicKey, SecretAttributes, SecretKey};
use ockam_core::Result;
use zeroize::Zeroize;
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<()>;
}