Trait quinn_proto::crypto::HeaderKey

source ·
pub trait HeaderKey: Send + Sync {
    // Required methods
    fn decrypt(&self, pn_offset: usize, packet: &mut [u8]);
    fn encrypt(&self, pn_offset: usize, packet: &mut [u8]);
    fn sample_size(&self) -> usize;
}
Expand description

Keys used to protect packet headers

Required Methods§

source

fn decrypt(&self, pn_offset: usize, packet: &mut [u8])

Decrypt the given packet’s header

source

fn encrypt(&self, pn_offset: usize, packet: &mut [u8])

Encrypt the given packet’s header

source

fn sample_size(&self) -> usize

The sample size used for this key’s algorithm

Implementations on Foreign Types§

source§

impl HeaderKey for Box<dyn HeaderProtectionKey>

source§

fn decrypt(&self, pn_offset: usize, packet: &mut [u8])

source§

fn encrypt(&self, pn_offset: usize, packet: &mut [u8])

source§

fn sample_size(&self) -> usize

Implementors§