feat(cipher-core): add PKCS#7 padding support

Add pkcs7_pad and pkcs7_unpad functions for block cipher modes:
    - Pad data to block size multiples with N bytes of value N
    - Validate and remove padding on decryption
    - Add InvalidPadding variant to CipherError
This commit is contained in:
2025-12-31 00:48:49 +02:00
parent f4480ba218
commit dd691cfa18
4 changed files with 177 additions and 1 deletions

View File

@@ -19,4 +19,4 @@ mod key;
mod operations;
mod sbox;
pub use {aes::Aes, block::Block128, block::Block32, iv::Iv};
pub use {aes::Aes, block::Block32, block::Block128, iv::Iv};