Skip to main content

EncryptionKeys

Trait EncryptionKeys 

Source
pub trait EncryptionKeys {
    // Required methods
    fn active_key(&self) -> Result<EncryptionKey<'_>>;
    fn decryption_key(&self, id: &str) -> Result<&[u8; 32]>;
}
Expand description

Supplies the active encryption key and historical decryption keys.

Required Methods§

Source

fn active_key(&self) -> Result<EncryptionKey<'_>>

Returns the key used for new envelopes.

§Errors

Returns an error when the active key is unavailable.

Source

fn decryption_key(&self, id: &str) -> Result<&[u8; 32]>

Returns key material for an identifier stored in an envelope.

§Errors

Returns an error when the requested key is unavailable.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§