First half of set 2

This commit is contained in:
2023-04-27 20:19:27 -07:00
parent ea25f818e5
commit 5a4924ab99
13 changed files with 410 additions and 14 deletions

13
examples/set2_9/main.rs Normal file
View File

@ -0,0 +1,13 @@
use cryptopals::friendly::pad_pkcs7;
fn main() {
assert_eq!(
pad_pkcs7(b"YELLOW SUBMARINE".to_vec(), 20),
b"YELLOW SUBMARINE\x04\x04\x04\x04"
);
assert_eq!(
pad_pkcs7(b"".to_vec(), 8),
b"\x08\x08\x08\x08\x08\x08\x08\x08"
);
println!("pass!")
}