Skip to main content

HeaderKey

Trait 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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

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§