Skip to main content

extract_single_recipient

Function extract_single_recipient 

Source
pub(crate) fn extract_single_recipient(
    cose_encrypt: &CoseEncrypt,
) -> Result<&CoseRecipient, ()>
Expand description

Extract the single recipient from a [coset::CoseEncrypt].

The COSE objects used by this module’s envelopes always carry exactly one recipient (holding the KDF parameters). Returns an error if there is not exactly one recipient.