Skip to main content

new_sender

Function new_sender 

Source
pub fn new_sender<K: Kem, D: Kdf, A: Aead>(
    mode: &Mode<'_>,
    recipient_public_key: &K::PublicKey,
    info: &[u8],
) -> Result<(K::EncappedKey, SenderContext<A, D>), HpkeError>
Expand description

Sets up a sender context (draft-ietf-hpke-hpke-05 Section 5.1).

The encapsulated key must be transmitted to the recipient alongside the first message.

§Errors