First half of set 2
This commit is contained in:
1 parent
ea25f818e5
commit
5a4924ab99
13 files changed
+410
-14
No files matched your search
@@ -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