Trait block_padding::Padding
source · pub trait Padding<BlockSize: ArrayLength<u8>> {
const TYPE: PadType;
// Required methods
fn pad(block: &mut Block<BlockSize>, pos: usize);
fn unpad(block: &Block<BlockSize>) -> Result<&[u8], UnpadError>;
// Provided method
fn unpad_blocks(blocks: &[Block<BlockSize>]) -> Result<&[u8], UnpadError> { ... }
}
Expand description
Trait for padding messages divided into blocks
Required Associated Constants§
Required Methods§
Provided Methods§
sourcefn unpad_blocks(blocks: &[Block<BlockSize>]) -> Result<&[u8], UnpadError>
fn unpad_blocks(blocks: &[Block<BlockSize>]) -> Result<&[u8], UnpadError>
Unpad data in the blocks
.
Returns Err(UnpadError)
if the block contains malformed padding.
Object Safety§
This trait is not object safe.