aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/hmac.rs
diff options
context:
space:
mode:
authorAlex Crichton <[email protected]>2015-01-09 08:07:39 -0800
committerAlex Crichton <[email protected]>2015-01-09 08:12:39 -0800
commit9dfeea6ca9f8527e8be56c208e21a1a48f22f6cf (patch)
treee26eea29b731b0c6df36847923e3a51b5bb048a4 /src/crypto/hmac.rs
parentMerge pull request #139 from vhbit/up-master (diff)
downloadrust-openssl-9dfeea6ca9f8527e8be56c208e21a1a48f22f6cf.tar.xz
rust-openssl-9dfeea6ca9f8527e8be56c208e21a1a48f22f6cf.zip
Update to rust master
Diffstat (limited to 'src/crypto/hmac.rs')
-rw-r--r--src/crypto/hmac.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crypto/hmac.rs b/src/crypto/hmac.rs
index 6de0b1e7..4a0c3e77 100644
--- a/src/crypto/hmac.rs
+++ b/src/crypto/hmac.rs
@@ -22,7 +22,7 @@ use ffi;
pub struct HMAC {
ctx: ffi::HMAC_CTX,
- len: uint,
+ len: u32,
}
#[allow(non_snake_case)]
@@ -53,10 +53,10 @@ impl HMAC {
pub fn finalize(&mut self) -> Vec<u8> {
unsafe {
- let mut res: Vec<u8> = repeat(0).take(self.len).collect();
+ let mut res: Vec<u8> = repeat(0).take(self.len as usize).collect();
let mut outlen = 0;
ffi::HMAC_Final(&mut self.ctx, res.as_mut_ptr(), &mut outlen);
- assert!(self.len == outlen as uint);
+ assert!(self.len == outlen as u32);
res
}
}