hpke-dispatch 0.9.0

Runtime algorithm selection for hybrid public key encryption
Documentation
/// Encapsulated key and ciphertext.
///
/// Obtained from [`crate::base_mode_seal::base_mode_seal`].
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct EncappedKeyAndCiphertext {
    /// The encapsulated encryption key
    pub encapped_key: Vec<u8>,

    /// The ciphertext, encrypted with the key
    pub ciphertext: Vec<u8>,
}

impl EncappedKeyAndCiphertext {
    /// returns (encapsulated key, ciphertext)
    #[must_use]
    pub fn into_parts(self) -> (Vec<u8>, Vec<u8>) {
        (self.encapped_key, self.ciphertext)
    }
}