Skip to main content

HpkeSealer

Trait HpkeSealer 

Source
pub trait HpkeSealer:
    Debug
    + Send
    + Sync
    + 'static {
    // Required method
    fn seal(&mut self, aad: &[u8], plaintext: &[u8]) -> Result<Vec<u8>, Error>;
}
Expand description

An HPKE sealer context.

This is a stateful object that can be used to seal messages for receipt by a receiver.

Required Methods§

Source

fn seal(&mut self, aad: &[u8], plaintext: &[u8]) -> Result<Vec<u8>, Error>

Seal the provided plaintext with additional data aad, returning ciphertext.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<const KEY_SIZE: usize, const KDF_SIZE: usize> HpkeSealer for Sealer<KEY_SIZE, KDF_SIZE>