Registry / crypto / block-padding

block-padding

JSON →
library0.4.2rscratesunverified

Provides padding and unpadding of messages divided into blocks, commonly used in cryptographic algorithms.

# Cargo.toml [dependencies] block-padding = "0.4.2"
INSTALL
IMPORT
SIG · BLOCK-PADDING
B
block-padding
cryptorustv0.4.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Pkcs7
use block_padding::{Padding, Pkcs7};

Pads a message using PKCS7 padding.

use block_padding::{Padding, Pkcs7}; fn main() { let block_size = 16; let data = b"hello"; let mut buffer = [0u8; 32]; buffer[..data.len()].copy_from_slice(data); let padded_len = Pkcs7::pad(&mut buffer, data.len(), block_size).unwrap(); println!("Padded length: {}", padded_len); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.4.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
18
Amazon
1
Resources
block-padding — cargo add block-padding · libregistry