Crate block_padding

Source
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.

Re-exports§

pub use generic_array;

Structs§

AnsiX923
Pad block with zeros except the last byte which will be set to the number bytes.
Iso7816
Pad block with byte sequence \x80 00...00 00.
Iso10126
Pad block with arbitrary bytes ending with value equal to the number of bytes added.
NoPadding
Don’t pad the data. Useful for key wrapping.
Pkcs7
Pad block with bytes with value equal to the number of bytes added.
UnpadError
Failed unpadding operation error.
ZeroPadding
Pad block with zeros.

Enums§

PadType
Padding types

Traits§

Padding
Trait for padding messages divided into blocks
RawPadding
Trait for padding messages divided into blocks of arbitrary size

Type Aliases§

Block
Block size.