aboutsummaryrefslogtreecommitdiff
path: root/hmac.rs
diff options
context:
space:
mode:
authorKevin Ballard <[email protected]>2013-05-29 23:42:07 -0700
committerKevin Ballard <[email protected]>2013-05-29 23:42:07 -0700
commit2eba04e579048bb33a7a99cb738d5d9118909026 (patch)
tree624777ef967533e7fcb40575a55de4058a37ee68 /hmac.rs
parentUpdate for current incoming (diff)
downloadrust-openssl-2eba04e579048bb33a7a99cb738d5d9118909026.tar.xz
rust-openssl-2eba04e579048bb33a7a99cb738d5d9118909026.zip
Update for latest incoming (3a3bf8b)
Diffstat (limited to 'hmac.rs')
-rw-r--r--hmac.rs15
1 files changed, 8 insertions, 7 deletions
diff --git a/hmac.rs b/hmac.rs
index 1c9e145d..025c1dfe 100644
--- a/hmac.rs
+++ b/hmac.rs
@@ -15,6 +15,7 @@
*/
use hash::*;
+use std::{libc,ptr,vec};
#[allow(non_camel_case_types)]
pub struct HMAC_CTX {
@@ -47,12 +48,12 @@ pub fn HMAC(ht: HashType, key: ~[u8]) -> HMAC {
let (evp, mdlen) = evpmd(ht);
let mut ctx : HMAC_CTX = HMAC_CTX {
- mut md: ptr::null(),
- mut md_ctx: ptr::null(),
- mut i_ctx: ptr::null(),
- mut o_ctx: ptr::null(),
- mut key_length: 0,
- mut key: [0u8, .. 128]
+ md: ptr::null(),
+ md_ctx: ptr::null(),
+ i_ctx: ptr::null(),
+ o_ctx: ptr::null(),
+ key_length: 0,
+ key: [0u8, .. 128]
};
HMAC_CTX_init(&mut ctx,
@@ -91,5 +92,5 @@ fn main() {
h.update([00u8]);
- io::println(fmt!("%?", h.final()))
+ println(fmt!("%?", h.final()))
}