Crate block_padding

Crate block_padding 

Source
Expand description

§RustCrypto: Block Padding

crate Docs Build Status Apache2/MIT licensed Rust Version Project Chat

Padding and unpadding of messages divided into blocks.

This crate provides the Padding trait with padding and unpadding methods. Additionally, several common padding schemes are available out of the box.

§License

Licensed under either of:

at your option.

§Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Re-exports§

pub use hybrid_array as array;

Structs§

AnsiX923
Pad block with zeros except the last byte which will be set to the number bytes.
Error
Error returned by the Padding trait methods.
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.
ZeroPadding
Pad block with zeros.

Enums§

PaddedData
Padded data split into blocks with detached last block returned by Padding::pad_detached.

Traits§

Padding
Trait for message padding algorithms.