summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/e_cfb_bf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/evp/e_cfb_bf.c')
-rw-r--r--src/lib/libcrypto/evp/e_cfb_bf.c29
1 files changed, 8 insertions, 21 deletions
diff --git a/src/lib/libcrypto/evp/e_cfb_bf.c b/src/lib/libcrypto/evp/e_cfb_bf.c
index 8aba2564b8..63e1e624ea 100644
--- a/src/lib/libcrypto/evp/e_cfb_bf.c
+++ b/src/lib/libcrypto/evp/e_cfb_bf.c
@@ -56,23 +56,16 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#ifndef NO_BLOWFISH 59#ifndef NO_BF
60
61#include <stdio.h> 60#include <stdio.h>
62#include "cryptlib.h" 61#include "cryptlib.h"
63#include "evp.h" 62#include <openssl/evp.h>
64#include "objects.h" 63#include <openssl/objects.h>
65 64
66#ifndef NOPROTO
67static void bf_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, 65static void bf_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
68 unsigned char *iv,int enc); 66 unsigned char *iv,int enc);
69static void bf_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, 67static void bf_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
70 unsigned char *in, unsigned int inl); 68 unsigned char *in, unsigned int inl);
71#else
72static void bf_cfb_init_key();
73static void bf_cfb_cipher();
74#endif
75
76static EVP_CIPHER bfish_cfb_cipher= 69static EVP_CIPHER bfish_cfb_cipher=
77 { 70 {
78 NID_bf_cfb64, 71 NID_bf_cfb64,
@@ -86,16 +79,13 @@ static EVP_CIPHER bfish_cfb_cipher=
86 EVP_CIPHER_get_asn1_iv, 79 EVP_CIPHER_get_asn1_iv,
87 }; 80 };
88 81
89EVP_CIPHER *EVP_bf_cfb() 82EVP_CIPHER *EVP_bf_cfb(void)
90 { 83 {
91 return(&bfish_cfb_cipher); 84 return(&bfish_cfb_cipher);
92 } 85 }
93 86
94static void bf_cfb_init_key(ctx,key,iv,enc) 87static void bf_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
95EVP_CIPHER_CTX *ctx; 88 unsigned char *iv, int enc)
96unsigned char *key;
97unsigned char *iv;
98int enc;
99 { 89 {
100 ctx->num=0; 90 ctx->num=0;
101 91
@@ -106,11 +96,8 @@ int enc;
106 BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key); 96 BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key);
107 } 97 }
108 98
109static void bf_cfb_cipher(ctx,out,in,inl) 99static void bf_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
110EVP_CIPHER_CTX *ctx; 100 unsigned char *in, unsigned int inl)
111unsigned char *out;
112unsigned char *in;
113unsigned int inl;
114 { 101 {
115 BF_cfb64_encrypt( 102 BF_cfb64_encrypt(
116 in,out, 103 in,out,