aboutsummaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2013-12-28 18:39:07 -0700
committerSteven Fackler <[email protected]>2013-12-28 18:39:07 -0700
commit9b3746260cb88e36df9be16b72c1c5f39204e78e (patch)
treeaadd76325a0505e0f6bfbea87444170501703e50 /crypto
parentMerge remote-tracking branches 'rustcrypto/master' and 'rust-ssl/master' (diff)
downloadrust-openssl-9b3746260cb88e36df9be16b72c1c5f39204e78e.tar.xz
rust-openssl-9b3746260cb88e36df9be16b72c1c5f39204e78e.zip
Integrate everything
Diffstat (limited to 'crypto')
-rw-r--r--crypto/hash.rs4
-rw-r--r--crypto/hmac.rs2
-rw-r--r--crypto/mod.rs (renamed from crypto/lib.rs)2
-rw-r--r--crypto/pkey.rs4
-rw-r--r--crypto/symm.rs4
5 files changed, 7 insertions, 9 deletions
diff --git a/crypto/hash.rs b/crypto/hash.rs
index bb75d0ef..9967ee1f 100644
--- a/crypto/hash.rs
+++ b/crypto/hash.rs
@@ -105,8 +105,8 @@ pub fn hash(t: HashType, data: &[u8]) -> ~[u8] {
#[cfg(test)]
mod tests {
- use hex::FromHex;
- use hex::ToHex;
+ use crypto::hex::FromHex;
+ use crypto::hex::ToHex;
struct HashTest {
input: ~[u8],
diff --git a/crypto/hmac.rs b/crypto/hmac.rs
index 5cac7f50..d7a76e08 100644
--- a/crypto/hmac.rs
+++ b/crypto/hmac.rs
@@ -17,7 +17,7 @@
use std::libc::{c_uchar, c_int, c_uint};
use std::ptr;
use std::vec;
-use hash;
+use crypto::hash;
#[allow(non_camel_case_types)]
pub struct HMAC_CTX {
diff --git a/crypto/lib.rs b/crypto/mod.rs
index f1038450..30fb08b0 100644
--- a/crypto/lib.rs
+++ b/crypto/mod.rs
@@ -15,8 +15,6 @@
* limitations under the License.
*/
-#[crate_id = "crypto#0.3"];
-
pub mod hash;
pub mod hex;
pub mod hmac;
diff --git a/crypto/pkey.rs b/crypto/pkey.rs
index b8206d4e..8a2b06c1 100644
--- a/crypto/pkey.rs
+++ b/crypto/pkey.rs
@@ -3,7 +3,7 @@ use std::libc::{c_char, c_int, c_uint};
use std::libc;
use std::ptr;
use std::vec;
-use hash::{HashType, MD5, SHA1, SHA224, SHA256, SHA384, SHA512};
+use crypto::hash::{HashType, MD5, SHA1, SHA224, SHA256, SHA384, SHA512};
#[allow(non_camel_case_types)]
pub type EVP_PKEY = *libc::c_void;
@@ -336,7 +336,7 @@ impl Drop for PKey {
#[cfg(test)]
mod tests {
- use hash::{MD5, SHA1};
+ use crypto::hash::{MD5, SHA1};
#[test]
fn test_gen_pub() {
diff --git a/crypto/symm.rs b/crypto/symm.rs
index d3c54d27..365a716a 100644
--- a/crypto/symm.rs
+++ b/crypto/symm.rs
@@ -194,7 +194,7 @@ pub fn decrypt(t: Type, key: &[u8], iv: ~[u8], data: &[u8]) -> ~[u8] {
#[cfg(test)]
mod tests {
- use hex::FromHex;
+ use crypto::hex::FromHex;
// Test vectors from FIPS-197:
// http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf
@@ -223,7 +223,7 @@ mod tests {
}
fn cipher_test(ciphertype: super::Type, pt: ~str, ct: ~str, key: ~str, iv: ~str) {
- use hex::ToHex;
+ use crypto::hex::ToHex;
let cipher = super::Crypter::new(ciphertype);
cipher.init(super::Encrypt, key.from_hex(), iv.from_hex());