diff options
| author | Edward Barnard <[email protected]> | 2015-08-03 18:22:07 +0100 |
|---|---|---|
| committer | Edward Barnard <[email protected]> | 2015-08-23 17:08:18 +0700 |
| commit | 8067565707d69c67b4815113764d26d820ae2bbf (patch) | |
| tree | fac3adb23420feece49fec551e735fe8337d0b55 /openssl-sys/src | |
| parent | Merge pull request #243 from manuels/master (diff) | |
| download | rust-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.rs | 6 |
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); |