From 9dd1c622f413935ddcb336c981bb64cdb109cc29 Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Wed, 18 Dec 2013 07:32:42 -0800 Subject: [PATCH] Update to rust 0.9x-pre --- .travis.yml | 1 + hmac.rs | 2 +- pkcs5.rs | 2 +- rand.rs | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 61136ed7..ed4eeddf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,3 +5,4 @@ install: - sudo apt-get install rust-nightly script: - make all + - ./crypto diff --git a/hmac.rs b/hmac.rs index c7cad6a2..5bc8b359 100644 --- a/hmac.rs +++ b/hmac.rs @@ -56,7 +56,7 @@ pub fn HMAC(ht: HashType, key: ~[u8]) -> HMAC { }; HMAC_CTX_init(&mut ctx, - vec::raw::to_ptr(key), + key.as_ptr(), key.len() as libc::c_int, evp); diff --git a/pkcs5.rs b/pkcs5.rs index b7c83a3f..9dfc026c 100644 --- a/pkcs5.rs +++ b/pkcs5.rs @@ -35,7 +35,7 @@ pub fn pbkdf2_hmac_sha1(pass: &str, salt: &[u8], iter: uint, if r != 1 as c_int { fail!(); } }); - unsafe { vec::raw::set_len(&mut out, keylen); } + unsafe { out.set_len(keylen); } out }) diff --git a/rand.rs b/rand.rs index 8e78c51c..6510b9f4 100644 --- a/rand.rs +++ b/rand.rs @@ -18,7 +18,7 @@ pub fn rand_bytes(len: uint) -> ~[u8] { if r != 1 as c_int { fail!() } }); - unsafe { vec::raw::set_len(&mut out, len); } + unsafe { out.set_len(len); } out }