pub trait Key: Send {
    fn decrypt(
        &self,
        packet_number: u64,
        header: &[u8],
        payload: &mut [u8]
    ) -> Result<(), CryptoError>; fn encrypt(
        &self,
        packet_number: u64,
        header: &[u8],
        payload: &mut [u8]
    ) -> Result<(), CryptoError>; fn tag_len(&self) -> usize; fn aead_confidentiality_limit(&self) -> u64; fn aead_integrity_limit(&self) -> u64; fn cipher_suite(&self) -> CipherSuite; }
Expand description

A trait for crypto keys

Required Methods

Decrypt a payload

Encrypt a payload

Length of the appended tag

Maximum number of packets a key can encrypt

Maximum number of decryption failures allowed for a cipher_suite

Implementors