aboutsummaryrefslogtreecommitdiff
path: root/src/crypto
diff options
context:
space:
mode:
authorMichael Gehring <[email protected]>2014-10-30 09:58:22 +0100
committerMichael Gehring <[email protected]>2014-10-30 09:58:22 +0100
commit1eb79df25abf3eede1f9d799992927986ce8c7a0 (patch)
tree8442882ca84d24508a59a9939654aadbdb54bbbc /src/crypto
parentMerge pull request #85 from vhbit/x509-load-pem (diff)
downloadrust-openssl-1eb79df25abf3eede1f9d799992927986ce8c7a0.tar.xz
rust-openssl-1eb79df25abf3eede1f9d799992927986ce8c7a0.zip
fail! -> panic!
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/memcmp.rs2
-rw-r--r--src/crypto/pkcs5.rs2
-rw-r--r--src/crypto/rand.rs2
-rw-r--r--src/crypto/symm.rs2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/crypto/memcmp.rs b/src/crypto/memcmp.rs
index c30281d4..7473fcab 100644
--- a/src/crypto/memcmp.rs
+++ b/src/crypto/memcmp.rs
@@ -8,7 +8,7 @@ use ffi;
///
/// # Failure
///
-/// This function will fail the current task if `a` and `b` do not have the same
+/// This function will panic the current task if `a` and `b` do not have the same
/// length.
pub fn eq(a: &[u8], b: &[u8]) -> bool {
assert!(a.len() == b.len());
diff --git a/src/crypto/pkcs5.rs b/src/crypto/pkcs5.rs
index feaff9c8..6efd23ff 100644
--- a/src/crypto/pkcs5.rs
+++ b/src/crypto/pkcs5.rs
@@ -17,7 +17,7 @@ pub fn pbkdf2_hmac_sha1(pass: &str, salt: &[u8], iter: uint, keylen: uint) -> Ve
iter as c_int, keylen as c_int,
out.as_mut_ptr());
- if r != 1 { fail!(); }
+ if r != 1 { panic!(); }
out.set_len(keylen);
diff --git a/src/crypto/rand.rs b/src/crypto/rand.rs
index 5f94c93c..92d38f2c 100644
--- a/src/crypto/rand.rs
+++ b/src/crypto/rand.rs
@@ -7,7 +7,7 @@ pub fn rand_bytes(len: uint) -> Vec<u8> {
ffi::init();
let r = ffi::RAND_bytes(out.as_mut_ptr(), len as c_int);
- if r != 1 as c_int { fail!() }
+ if r != 1 as c_int { panic!() }
out.set_len(len);
diff --git a/src/crypto/symm.rs b/src/crypto/symm.rs
index 171c1b05..954fa298 100644
--- a/src/crypto/symm.rs
+++ b/src/crypto/symm.rs
@@ -214,7 +214,7 @@ mod tests {
println!("Lengths differ: {} in computed vs {} expected",
computed.len(), expected.len());
}
- fail!("test failure");
+ panic!("test failure");
}
}