diff options
| author | Steven Fackler <[email protected]> | 2014-04-18 23:56:01 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2014-04-18 23:56:01 -0700 |
| commit | cfc79313f59b18a0e6d11002185b503b1590f9d3 (patch) | |
| tree | 089df2dfd4add719df49095e6e92f71303cdbe7d /crypto/hmac.rs | |
| parent | Update for IO changes (diff) | |
| download | rust-openssl-cfc79313f59b18a0e6d11002185b503b1590f9d3.tar.xz rust-openssl-cfc79313f59b18a0e6d11002185b503b1590f9d3.zip | |
Update for ~[T] changes
Diffstat (limited to 'crypto/hmac.rs')
| -rw-r--r-- | crypto/hmac.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/hmac.rs b/crypto/hmac.rs index b66180fc..a30ce4aa 100644 --- a/crypto/hmac.rs +++ b/crypto/hmac.rs @@ -16,7 +16,6 @@ use libc::{c_uchar, c_int, c_uint}; use std::ptr; -use std::slice; use crypto::hash; #[allow(non_camel_case_types)] @@ -70,9 +69,9 @@ impl HMAC { } } - pub fn final(&mut self) -> ~[u8] { + pub fn final(&mut self) -> Vec<u8> { unsafe { - let mut res = slice::from_elem(self.len, 0u8); + let mut res = Vec::from_elem(self.len, 0u8); let mut outlen = 0; HMAC_Final(&mut self.ctx, res.as_mut_ptr(), &mut outlen); assert!(self.len == outlen as uint) |