Skip to main content

SecurityProcessor

Trait SecurityProcessor 

Source
pub trait SecurityProcessor {
    type Error;

    // Required methods
    fn apply(&mut self, frame: &mut [u8]) -> Result<usize, Self::Error>;
    fn process(&mut self, frame: &mut [u8]) -> Result<usize, Self::Error>;
}
Expand description

Applies or removes security (encryption/authentication) on frames.

Required Associated Types§

Source

type Error

Error type for security operations.

Required Methods§

Source

fn apply(&mut self, frame: &mut [u8]) -> Result<usize, Self::Error>

Applies security (encrypt/authenticate) to a frame in-place.

Source

fn process(&mut self, frame: &mut [u8]) -> Result<usize, Self::Error>

Removes security (decrypt/verify) from a frame in-place.

Implementors§