aboutsummaryrefslogtreecommitdiff
path: root/openssl-sys/src
diff options
context:
space:
mode:
authorEdward Barnard <[email protected]>2015-08-03 18:22:07 +0100
committerEdward Barnard <[email protected]>2015-08-23 17:08:18 +0700
commit8067565707d69c67b4815113764d26d820ae2bbf (patch)
treefac3adb23420feece49fec551e735fe8337d0b55 /openssl-sys/src
parentMerge pull request #243 from manuels/master (diff)
downloadrust-openssl-8067565707d69c67b4815113764d26d820ae2bbf.tar.xz
rust-openssl-8067565707d69c67b4815113764d26d820ae2bbf.zip
Expose EVP_BytesToKey
This is based on work by pyrho. Closes #88
Diffstat (limited to 'openssl-sys/src')
-rw-r--r--openssl-sys/src/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs
index 55ec30bb..e5efbdfa 100644
--- a/openssl-sys/src/lib.rs
+++ b/openssl-sys/src/lib.rs
@@ -128,6 +128,8 @@ pub const MBSTRING_UTF8: c_int = MBSTRING_FLAG;
pub const NID_ext_key_usage: c_int = 126;
pub const NID_key_usage: c_int = 83;
+pub const PKCS5_SALT_LEN: c_int = 8;
+
pub const SSL_CTRL_OPTIONS: c_int = 32;
pub const SSL_CTRL_CLEAR_OPTIONS: c_int = 77;
@@ -409,6 +411,10 @@ extern "C" {
// fn EVP_aes_256_gcm() -> EVP_CIPHER;
pub fn EVP_rc4() -> *const EVP_CIPHER;
+ pub fn EVP_BytesToKey(typ: *const EVP_CIPHER, md: *const EVP_MD,
+ salt: *const u8, data: *const u8, datalen: c_int,
+ count: c_int, key: *mut u8, iv: *mut u8) -> c_int;
+
pub fn EVP_CIPHER_CTX_new() -> *mut EVP_CIPHER_CTX;
pub fn EVP_CIPHER_CTX_set_padding(ctx: *mut EVP_CIPHER_CTX, padding: c_int) -> c_int;
pub fn EVP_CIPHER_CTX_free(ctx: *mut EVP_CIPHER_CTX);