Skip to main content

Keyring

Trait Keyring 

Source
pub trait Keyring: Send + Sync {
    // Required methods
    fn key<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 KeyId,
        epoch: u32,
    ) -> Pin<Box<dyn Future<Output = Result<SecretKey, KeyError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn current_epoch<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 KeyId,
    ) -> Pin<Box<dyn Future<Output = Result<u32, KeyError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn wrap<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        id: &'life1 KeyId,
        epoch: u32,
        dek: &'life2 SecretKey,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, KeyError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn unwrap<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        id: &'life1 KeyId,
        epoch: u32,
        wrapped: &'life2 [u8],
    ) -> Pin<Box<dyn Future<Output = Result<SecretKey, KeyError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn key_ids(&self) -> &[KeyId];
}
Expand description

Resolves key material without coupling Corium to a KMS implementation.

Required Methods§

Source

fn key<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 KeyId, epoch: u32, ) -> Pin<Box<dyn Future<Output = Result<SecretKey, KeyError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Resolves material for a specific epoch.

Source

fn current_epoch<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 KeyId, ) -> Pin<Box<dyn Future<Output = Result<u32, KeyError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns the epoch new writes should use.

Source

fn wrap<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 KeyId, epoch: u32, dek: &'life2 SecretKey, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, KeyError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Wraps a data-encryption key under the requested key and epoch.

Source

fn unwrap<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 KeyId, epoch: u32, wrapped: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = Result<SecretKey, KeyError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Unwraps a stored data-encryption key.

Source

fn key_ids(&self) -> &[KeyId]

Lists the key identities this process can resolve.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§