Loading crypto/hash.rs +2 −2 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ mod tests { use serialize::hex::{FromHex, ToHex}; struct HashTest { input: ~[u8], input: Vec<u8>, expected_output: ~str } Loading @@ -117,7 +117,7 @@ mod tests { } fn hash_test(hashtype: super::HashType, hashtest: &HashTest) { let calced_raw = super::hash(hashtype, hashtest.input); let calced_raw = super::hash(hashtype, hashtest.input.as_slice()); let calced = calced_raw.as_slice().to_hex(); Loading crypto/symm.rs +3 −3 Original line number Diff line number Diff line Loading @@ -225,10 +225,10 @@ mod tests { use serialize::hex::ToHex; let cipher = super::Crypter::new(ciphertype); cipher.init(super::Encrypt, key.from_hex().unwrap(), iv.from_hex().unwrap()); cipher.init(super::Encrypt, key.from_hex().unwrap().as_slice(), iv.from_hex().unwrap().as_slice()); let expected = Vec::from_slice(ct.from_hex().unwrap()); let computed = cipher.update(pt.from_hex().unwrap()).append(cipher.final().as_slice()); let expected = Vec::from_slice(ct.from_hex().unwrap().as_slice()); let computed = cipher.update(pt.from_hex().unwrap().as_slice()).append(cipher.final().as_slice()); if computed != expected { println!("Computed: {}", computed.as_slice().to_hex()); Loading Loading
crypto/hash.rs +2 −2 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ mod tests { use serialize::hex::{FromHex, ToHex}; struct HashTest { input: ~[u8], input: Vec<u8>, expected_output: ~str } Loading @@ -117,7 +117,7 @@ mod tests { } fn hash_test(hashtype: super::HashType, hashtest: &HashTest) { let calced_raw = super::hash(hashtype, hashtest.input); let calced_raw = super::hash(hashtype, hashtest.input.as_slice()); let calced = calced_raw.as_slice().to_hex(); Loading
crypto/symm.rs +3 −3 Original line number Diff line number Diff line Loading @@ -225,10 +225,10 @@ mod tests { use serialize::hex::ToHex; let cipher = super::Crypter::new(ciphertype); cipher.init(super::Encrypt, key.from_hex().unwrap(), iv.from_hex().unwrap()); cipher.init(super::Encrypt, key.from_hex().unwrap().as_slice(), iv.from_hex().unwrap().as_slice()); let expected = Vec::from_slice(ct.from_hex().unwrap()); let computed = cipher.update(pt.from_hex().unwrap()).append(cipher.final().as_slice()); let expected = Vec::from_slice(ct.from_hex().unwrap().as_slice()); let computed = cipher.update(pt.from_hex().unwrap().as_slice()).append(cipher.final().as_slice()); if computed != expected { println!("Computed: {}", computed.as_slice().to_hex()); Loading