From 7bcccede3eaa3d2ef01aa274e46f27e1673a1f21 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 3 Apr 2015 20:33:25 -0400 Subject: refactor to allow specifying the keysize --- tests/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/lib.rs b/tests/lib.rs index 08fb2a9..65380cf 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -105,7 +105,8 @@ fn problem_5 () { fn problem_6 () { let ciphertext = read_as_base64("data/6.txt"); let plaintext = read("data/6.out.txt"); - let got = matasano::crack_repeating_key_xor(&ciphertext[..]); + let key = matasano::crack_repeating_key_xor(&ciphertext[..]); + let got = matasano::repeating_key_xor(&ciphertext[..], &key[..]); assert_eq!(got, plaintext); } -- cgit v1.2.3-54-g00ecf