From 75b5c3f2f36d527216920d6d437bc1eef3237cd0 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 28 Mar 2015 04:28:46 -0400 Subject: problem 18 --- tests/lib.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests') diff --git a/tests/lib.rs b/tests/lib.rs index 5fb8261..f0ead77 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -392,3 +392,16 @@ fn problem_17 () { assert_eq!(&plaintext, expected); } } + +#[test] +fn problem_18 () { + let ciphertext = b"L77na/nrFsKvynd6HzOoG7GHTLXsTVu9qvY/2syL\ + XzhPweyyMTJULu/6/kXX0KSvoOLSFQ==".from_base64().unwrap(); + let plaintext = &b"Yo, VIP Let's kick it Ice, Ice, baby Ice, Ice, baby "[..]; + let got = matasano::aes_128_ctr( + &ciphertext[..], + b"YELLOW SUBMARINE", + 0 + ); + assert_eq!(got, plaintext); +} -- cgit v1.2.3-54-g00ecf