Skip to main content

HpkeOpener

Trait HpkeOpener 

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

An HPKE opener context.

This is a stateful object that can be used to open sealed messages sealed by a sender.

Required Methods§

Source

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

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

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> HpkeOpener for Opener<KEY_SIZE, KDF_SIZE>