diff options
| author | Charlie Ozinga <[email protected]> | 2016-04-14 03:44:43 -0600 |
|---|---|---|
| committer | Charlie Ozinga <[email protected]> | 2016-04-14 03:44:43 -0600 |
| commit | 2062d48dd2fa5645889f2fda06c84de7bf546806 (patch) | |
| tree | 04e974455e4a753cb304f6a593f6def883c4c443 /openssl/src/crypto/symm_internal.rs | |
| parent | Update for nightly changes (diff) | |
| download | rust-openssl-2062d48dd2fa5645889f2fda06c84de7bf546806.tar.xz rust-openssl-2062d48dd2fa5645889f2fda06c84de7bf546806.zip | |
Add 1DES symm ciphers (des-cbc, des-ecb, des-cfb, des-ofb)
1DES is well and truly dead for actual sensitive information, (its
keysize is too small for modern purposes), but it can still find use in
backwards compatiblity or educational applications.
Diffstat (limited to 'openssl/src/crypto/symm_internal.rs')
| -rw-r--r-- | openssl/src/crypto/symm_internal.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/openssl/src/crypto/symm_internal.rs b/openssl/src/crypto/symm_internal.rs index 5c457f3f..37b9025c 100644 --- a/openssl/src/crypto/symm_internal.rs +++ b/openssl/src/crypto/symm_internal.rs @@ -26,6 +26,11 @@ pub fn evpc(t: symm::Type) -> (*const ffi::EVP_CIPHER, u32, u32) { symm::Type::AES_256_CFB128 => (ffi::EVP_aes_256_cfb128(), 32, 16), symm::Type::AES_256_CFB8 => (ffi::EVP_aes_256_cfb8(), 32, 16), + symm::Type::DES_CBC => (ffi::EVP_des_cbc(), 8, 8), + symm::Type::DES_ECB => (ffi::EVP_des_ecb(), 8, 8), + symm::Type::DES_CFB => (ffi::EVP_des_cfb(), 8, 8), + symm::Type::DES_OFB => (ffi::EVP_des_ofb(), 8, 8), + symm::Type::RC4_128 => (ffi::EVP_rc4(), 16, 0), } } |