aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/hash.rs
diff options
context:
space:
mode:
authorChris Cole <[email protected]>2014-12-23 15:14:27 -0500
committerChris Cole <[email protected]>2014-12-23 15:14:27 -0500
commit156fc65eb0138da8c603df82baa4a756d4d6d420 (patch)
tree9bf3be6761bfbc3c2d27454f429965f9e8790e08 /src/crypto/hash.rs
parentAdded BigNum::{from_dec_str,from_hex_str}, BN_dec2bn, and BN_hex2bn. (diff)
parentRelease v0.2.8 (diff)
downloadrust-openssl-156fc65eb0138da8c603df82baa4a756d4d6d420.tar.xz
rust-openssl-156fc65eb0138da8c603df82baa4a756d4d6d420.zip
Merge remote-tracking branch 'upstream/master'
Conflicts: openssl-sys/src/lib.rs
Diffstat (limited to 'src/crypto/hash.rs')
-rw-r--r--src/crypto/hash.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/crypto/hash.rs b/src/crypto/hash.rs
index b5d0eab5..2a181526 100644
--- a/src/crypto/hash.rs
+++ b/src/crypto/hash.rs
@@ -4,6 +4,7 @@ use std::io;
use ffi;
+#[deriving(Copy)]
pub enum HashType {
MD5,
SHA1,
@@ -134,7 +135,7 @@ mod tests {
}
fn compare(calced_raw: Vec<u8>, hashtest: &HashTest) {
- let calced = calced_raw.as_slice().to_hex().into_string();
+ let calced = calced_raw.as_slice().to_hex().to_string();
if calced != hashtest.expected_output {
println!("Test failed - {} != {}", calced, hashtest.expected_output);