summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2015-03-15 17:55:33 -0400
committerJesse Luehrs <doy@tozt.net>2015-03-15 17:55:33 -0400
commit118cd5f72956e91c256ef066db0054a7bcd14f50 (patch)
treeefb729099a3a4dae000bd8baa16f484e74a83191 /tests
parent87ec67f3a3ed76e1b186e324ac3cd3d226cf320a (diff)
downloadmatasano-118cd5f72956e91c256ef066db0054a7bcd14f50.tar.gz
matasano-118cd5f72956e91c256ef066db0054a7bcd14f50.zip
problem 9
Diffstat (limited to 'tests')
-rw-r--r--tests/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/lib.rs b/tests/lib.rs
index a3e797e..e5392b0 100644
--- a/tests/lib.rs
+++ b/tests/lib.rs
@@ -111,3 +111,10 @@ fn problem_8 () {
let got = matasano::find_aes_128_ecb_encrypted_string(&possibles[..]);
assert_eq!(got, ciphertext);
}
+
+#[test]
+fn problem_9 () {
+ let block = b"YELLOW SUBMARINE";
+ let got = matasano::pad_pkcs7(block, 20);
+ assert_eq!(got, b"YELLOW SUBMARINE\x04\x04\x04\x04");
+}