pub trait Padding {
// Required methods
fn padded_buffer_length(data_length: usize, block_size: usize) -> usize;
fn pad(
buffer: &mut [u8],
data_length: usize,
block_size: usize,
) -> Result<&[u8], Error>;
fn unpad(buffer: &[u8]) -> Result<&[u8], Error>;
}Expand description
Trait defining interface for a Padding implementation
Required Methods§
Sourcefn padded_buffer_length(data_length: usize, block_size: usize) -> usize
fn padded_buffer_length(data_length: usize, block_size: usize) -> usize
Given a length of data and block_size return the minimum size of a buffer required to hold the padded data
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".