First half of set 2
This commit is contained in:
13
examples/set2_9/main.rs
Normal file
13
examples/set2_9/main.rs
Normal 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!")
|
||||
}
|
Reference in New Issue
Block a user