diff options
| author | Steven Fackler <[email protected]> | 2015-12-15 19:30:57 -0800 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2015-12-15 19:30:57 -0800 |
| commit | 167008d24728a8ba0e0f988d4399a4a9e3acb29d (patch) | |
| tree | 9700535523641f5d8673d5869f8b82b4df623293 /openssl-sys | |
| parent | Merge pull request #309 from Geal/master (diff) | |
| parent | Put pbkdf2_hmac_{256,512}() behind feature gate (diff) | |
| download | rust-openssl-167008d24728a8ba0e0f988d4399a4a9e3acb29d.tar.xz rust-openssl-167008d24728a8ba0e0f988d4399a4a9e3acb29d.zip | |
Merge pull request #320 from uasi/add-variations-of-pbkdf2
Add PBKDF2-HMAC-SHA256 and -SHA512 functions
Diffstat (limited to 'openssl-sys')
| -rw-r--r-- | openssl-sys/Cargo.toml | 1 | ||||
| -rw-r--r-- | openssl-sys/src/lib.rs | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/openssl-sys/Cargo.toml b/openssl-sys/Cargo.toml index 17e4647f..1e025d84 100644 --- a/openssl-sys/Cargo.toml +++ b/openssl-sys/Cargo.toml @@ -23,6 +23,7 @@ aes_ctr = [] npn = [] alpn = [] rfc5114 = [] +pkcs5_pbkdf2_hmac = [] [dependencies] libc = "0.2" diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index 4221e808..1fc6777f 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -539,7 +539,11 @@ extern "C" { salt: *const u8, saltlen: c_int, iter: c_int, keylen: c_int, out: *mut u8) -> c_int; - + #[cfg(feature = "pkcs5_pbkdf2_hmac")] + pub fn PKCS5_PBKDF2_HMAC(pass: *const u8, passlen: c_int, + salt: *const u8, saltlen: c_int, + iter: c_int, digest: *const EVP_MD, keylen: c_int, + out: *mut u8) -> c_int; pub fn RAND_bytes(buf: *mut u8, num: c_int) -> c_int; |