aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpyrho <[email protected]>2014-10-28 14:15:13 +0100
committerpyrho <[email protected]>2014-10-28 14:15:13 +0100
commit42e9438e4ffd0d73cc3a72a08093ecfe728838b5 (patch)
treeb217b8d685f4beb492c1482e933d963554fc6580 /src
parentMerge remote-tracking branch 'upstream/master' into aes-256-cbc-decrypt-test (diff)
downloadrust-openssl-42e9438e4ffd0d73cc3a72a08093ecfe728838b5.tar.xz
rust-openssl-42e9438e4ffd0d73cc3a72a08093ecfe728838b5.zip
Replaced vector of bytes with bytes string literal for expected output of AES_256_CBC deciphering unit test
Diffstat (limited to 'src')
-rw-r--r--src/crypto/symm.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/crypto/symm.rs b/src/crypto/symm.rs
index bacee55d..6a823c4a 100644
--- a/src/crypto/symm.rs
+++ b/src/crypto/symm.rs
@@ -221,17 +221,12 @@ mod tests {
let unciphered_data_1 = cr.update(ciphered_data);
let unciphered_data_2 = cr.finalize();
- // A string translating to "I love turtles." with a trailing
- // 0x1 as last byte.
- let expected_unciphered_data = vec![
- 0x49_u8, 0x20_u8, 0x6c_u8, 0x6f_u8, 0x76_u8, 0x65_u8, 0x20_u8, 0x74_u8,
- 0x75_u8, 0x72_u8, 0x74_u8, 0x6c_u8, 0x65_u8, 0x73_u8, 0x2e_u8, 0x1_u8
- ];
+ let expected_unciphered_data = b"I love turtles.\x01";
assert!(unciphered_data_2.len() == 0);
assert_eq!(
- unciphered_data_1,
+ unciphered_data_1.as_slice(),
expected_unciphered_data
);
}