summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2015-04-03 20:33:25 -0400
committerJesse Luehrs <doy@tozt.net>2015-04-04 01:34:22 -0400
commit7bcccede3eaa3d2ef01aa274e46f27e1673a1f21 (patch)
treea0a2b8b097b3e23049e67c7cc613ac7a977b0fce /tests
parentabb70d2f9bf9fe74397a5f644aca5fabbacc77dc (diff)
downloadmatasano-7bcccede3eaa3d2ef01aa274e46f27e1673a1f21.tar.gz
matasano-7bcccede3eaa3d2ef01aa274e46f27e1673a1f21.zip
refactor to allow specifying the keysize
Diffstat (limited to 'tests')
-rw-r--r--tests/lib.rs3
1 files changed, 2 insertions, 1 deletions
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);
}