summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2015-03-22 23:16:35 -0400
committerJesse Luehrs <doy@tozt.net>2015-03-22 23:16:35 -0400
commitafc451615ea4c1713b4b101294dbd71ab1987193 (patch)
tree8a2c3500694fd0d010f6899313b54c86e3a6522b
parent72efc26b14875c9c99578ca7a2bfd26ad1dfbbf0 (diff)
downloadmatasano-afc451615ea4c1713b4b101294dbd71ab1987193.tar.gz
matasano-afc451615ea4c1713b4b101294dbd71ab1987193.zip
a few more explicit slices necessary for new rust
-rw-r--r--src/aes.rs4
-rw-r--r--tests/lib.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/aes.rs b/src/aes.rs
index e3d555b..b3aa71c 100644
--- a/src/aes.rs
+++ b/src/aes.rs
@@ -281,8 +281,8 @@ fn test_encrypt_decrypt () {
let ciphertext2_ecb = encrypt_aes_128_ecb(&plaintext2_ecb[..], &key[..]);
let ciphertext2_cbc = encrypt_aes_128_cbc(&plaintext2_cbc[..], &key[..], &iv[..]);
- assert_eq!(plaintext, plaintext2_ecb);
- assert_eq!(plaintext, plaintext2_cbc);
+ assert_eq!(&plaintext[..], plaintext2_ecb);
+ assert_eq!(&plaintext[..], plaintext2_cbc);
assert_eq!(ciphertext_ecb, ciphertext2_ecb);
assert_eq!(ciphertext_cbc, ciphertext2_cbc);
}
diff --git a/tests/lib.rs b/tests/lib.rs
index 1650165..5b5cac7 100644
--- a/tests/lib.rs
+++ b/tests/lib.rs
@@ -69,7 +69,7 @@ fn problem_3 () {
28372d363c78373e783a393b3736".from_hex().unwrap();
let plaintext = b"Cooking MC's like a pound of bacon";
let got = matasano::crack_single_byte_xor(&ciphertext[..]);
- assert_eq!(got, plaintext);
+ assert_eq!(got, &plaintext[..]);
}
#[test]