pub fn new_recipient<K: Kem, D: Kdf, A: Aead>(
mode: &Mode<'_>,
recipient_secret_key: &K::SecretKey,
encapped_key: &K::EncappedKey,
info: &[u8],
) -> Result<RecipientContext<A, D>, HpkeError>Expand description
Sets up a recipient context (draft-ietf-hpke-hpke-05 Section 5.1).
ยงErrors
HpkeError::DecapErrorwhen the encapsulated key is invalid or the key exchange fails.HpkeError::ValidationErrorwhen the pre-shared key or its identifier is empty in a pre-shared key mode.