[−][src]Trait block_padding::Padding
Trait for padding messages divided into blocks
Required methods
pub fn pad(block: &mut Block<BlockSize>, pos: usize)[src]
Pads block filled with data up to pos (i.e length of a message
stored in the block is equal to pos).
Panics
If pos is bigger than BlockSize. Most paddin algorithms also
panic if they are equal.
pub fn unpad(block: &Block<BlockSize>) -> Result<&[u8], UnpadError>[src]
Unpad data in the block.
Returns Err(UnpadError) if the block containts malformed padding.