diff options
author | Steven Fackler <sfackler@gmail.com> | 2014-05-23 20:12:36 -0700 |
---|---|---|
committer | Steven Fackler <sfackler@gmail.com> | 2014-05-23 20:12:36 -0700 |
commit | 1664d38342e0d67ebb84c51e17c8ba104c006797 (patch) | |
tree | 2499b3682742e72c092e3d34e562c1f8f7ab0bdb | |
parent | c0a964fc7b5f47c47ccf6fa59cb440f5e9bbf99b (diff) | |
download | rust-openssl-1664d38342e0d67ebb84c51e17c8ba104c006797.zip |
Update for string changes
-rw-r--r-- | crypto/hash.rs | 2 | ||||
-rw-r--r-- | crypto/symm.rs | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/crypto/hash.rs b/crypto/hash.rs index 8dd581c7..472b3b0b 100644 --- a/crypto/hash.rs +++ b/crypto/hash.rs @@ -108,7 +108,7 @@ mod tests { struct HashTest { input: Vec<u8>, - expected_output: ~str + expected_output: StrBuf } fn HashTest(input: &str, output: &str) -> HashTest { diff --git a/crypto/symm.rs b/crypto/symm.rs index 00846380..fa68c116 100644 --- a/crypto/symm.rs +++ b/crypto/symm.rs @@ -221,7 +221,7 @@ mod tests { assert!(p1 == p0); } - fn cipher_test(ciphertype: super::Type, pt: ~str, ct: ~str, key: ~str, iv: ~str) { + fn cipher_test(ciphertype: super::Type, pt: &str, ct: &str, key: &str, iv: &str) { use serialize::hex::ToHex; let cipher = super::Crypter::new(ciphertype); @@ -244,10 +244,10 @@ mod tests { #[test] fn test_rc4() { - let pt = "0000000000000000000000000000000000000000000000000000000000000000000000000000".to_owned(); - let ct = "A68686B04D686AA107BD8D4CAB191A3EEC0A6294BC78B60F65C25CB47BD7BB3A48EFC4D26BE4".to_owned(); - let key = "97CD440324DA5FD1F7955C1C13B6B466".to_owned(); - let iv = "".to_owned(); + let pt = "0000000000000000000000000000000000000000000000000000000000000000000000000000"; + let ct = "A68686B04D686AA107BD8D4CAB191A3EEC0A6294BC78B60F65C25CB47BD7BB3A48EFC4D26BE4"; + let key = "97CD440324DA5FD1F7955C1C13B6B466"; + let iv = ""; cipher_test(super::RC4_128, pt, ct, key, iv); } |