crypto::blockmodes

Trait PaddingProcessor

Source
pub trait PaddingProcessor {
    // Required methods
    fn pad_input<W: WriteBuffer>(&mut self, input_buffer: &mut W);
    fn strip_output<R: ReadBuffer>(&mut self, output_buffer: &mut R) -> bool;
}
Expand description

A PaddingProcessor handles adding or removing padding

Required Methods§

Source

fn pad_input<W: WriteBuffer>(&mut self, input_buffer: &mut W)

Add padding to the last block of input data If the mode can’t handle a non-full block, it signals that error by simply leaving the block as it is which will be detected as an InvalidLength error.

Source

fn strip_output<R: ReadBuffer>(&mut self, output_buffer: &mut R) -> bool

Remove padding from the last block of output data If false is returned, the processing fails

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§