logo
Expand description

Padding and unpadding of messages divided into blocks.

This crate provides Padding trait which provides padding and unpadding operations. Additionally several common padding schemes are available out of the box.

Structs

Error for indicating failed padding operation

Error for indicating failed unpadding operation

Enums

Pad block with zeros except the last byte which will be set to the number bytes.

Pad block with byte sequence \x80 00...00 00.

Don’t pad the data. Useful for key wrapping. Padding will fail if the data cannot be fitted into blocks without padding.

Pad block with bytes with value equal to the number of bytes added.

Pad block with zeros.

Traits

Trait for padding messages divided into blocks