KeyProvider

Trait KeyProvider 

Source
pub trait KeyProvider: Send + Sync {
    // Required methods
    fn wrap_dek(&self, scope: &Scope, dek: &[u8]) -> Result<Vec<u8>, Error>;
    fn unwrap_dek(
        &self,
        scope: &Scope,
        wrapped: &[u8],
    ) -> Result<Vec<u8>, Error>;
}
Expand description

Trait implemented by key providers responsible for wrapping and unwrapping DEKs.

Required Methods§

Source

fn wrap_dek(&self, scope: &Scope, dek: &[u8]) -> Result<Vec<u8>, Error>

Source

fn unwrap_dek(&self, scope: &Scope, wrapped: &[u8]) -> Result<Vec<u8>, Error>

Implementations on Foreign Types§

Source§

impl<T> KeyProvider for Box<T>
where T: KeyProvider + ?Sized,

Source§

fn wrap_dek(&self, scope: &Scope, dek: &[u8]) -> Result<Vec<u8>, Error>

Source§

fn unwrap_dek(&self, scope: &Scope, wrapped: &[u8]) -> Result<Vec<u8>, Error>

Source§

impl<T> KeyProvider for Arc<T>
where T: KeyProvider + ?Sized,

Source§

fn wrap_dek(&self, scope: &Scope, dek: &[u8]) -> Result<Vec<u8>, Error>

Source§

fn unwrap_dek(&self, scope: &Scope, wrapped: &[u8]) -> Result<Vec<u8>, Error>

Implementors§