Commit 00816653 authored by 0xa's avatar 0xa
Browse files

Add Blowfish support

parent e2331b29
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1445,6 +1445,10 @@ extern {
    pub fn EVP_aes_256_cfb1() -> *const EVP_CIPHER;
    pub fn EVP_aes_256_cfb128() -> *const EVP_CIPHER;
    pub fn EVP_aes_256_cfb8() -> *const EVP_CIPHER;
    pub fn EVP_bf_cbc() -> *const EVP_CIPHER;
    pub fn EVP_bf_ecb() -> *const EVP_CIPHER;
    pub fn EVP_bf_cfb() -> *const EVP_CIPHER;
    pub fn EVP_bf_ofb() -> *const EVP_CIPHER;
    pub fn EVP_rc4() -> *const EVP_CIPHER;

    pub fn EVP_des_cbc() -> *const EVP_CIPHER;
+16 −0
Original line number Diff line number Diff line
@@ -80,6 +80,22 @@ impl Cipher {
        unsafe { Cipher(ffi::EVP_aes_256_gcm()) }
    }

    pub fn bf_cbc() -> Cipher {
        unsafe { Cipher(ffi::EVP_bf_cbc()) }
    }

    pub fn bf_ecb() -> Cipher {
        unsafe { Cipher(ffi::EVP_bf_ecb()) }
    }

    pub fn bf_cfb() -> Cipher {
        unsafe { Cipher(ffi::EVP_bf_cfb()) }
    }

    pub fn bf_ofb() -> Cipher {
        unsafe { Cipher(ffi::EVP_bf_ofb()) }
    }

    pub fn des_cbc() -> Cipher {
        unsafe { Cipher(ffi::EVP_des_cbc()) }
    }