diff options
-rw-r--r-- | src/aes.rs | 4 | ||||
-rw-r--r-- | tests/lib.rs | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -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] |