diff options
Diffstat (limited to 'src/lib/libcrypto/evp/e_ofb_c.c')
-rw-r--r-- | src/lib/libcrypto/evp/e_ofb_c.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/src/lib/libcrypto/evp/e_ofb_c.c b/src/lib/libcrypto/evp/e_ofb_c.c index f1eef4469c..971043de4c 100644 --- a/src/lib/libcrypto/evp/e_ofb_c.c +++ b/src/lib/libcrypto/evp/e_ofb_c.c | |||
@@ -60,19 +60,13 @@ | |||
60 | 60 | ||
61 | #include <stdio.h> | 61 | #include <stdio.h> |
62 | #include "cryptlib.h" | 62 | #include "cryptlib.h" |
63 | #include "evp.h" | 63 | #include <openssl/evp.h> |
64 | #include "objects.h" | 64 | #include <openssl/objects.h> |
65 | 65 | ||
66 | #ifndef NOPROTO | ||
67 | static void cast_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | 66 | static void cast_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, |
68 | unsigned char *iv,int enc); | 67 | unsigned char *iv,int enc); |
69 | static void cast_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | 68 | static void cast_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, |
70 | unsigned char *in, unsigned int inl); | 69 | unsigned char *in, unsigned int inl); |
71 | #else | ||
72 | static void cast_ofb_init_key(); | ||
73 | static void cast_ofb_cipher(); | ||
74 | #endif | ||
75 | |||
76 | static EVP_CIPHER cast5_ofb_cipher= | 70 | static EVP_CIPHER cast5_ofb_cipher= |
77 | { | 71 | { |
78 | NID_cast5_ofb64, | 72 | NID_cast5_ofb64, |
@@ -86,16 +80,13 @@ static EVP_CIPHER cast5_ofb_cipher= | |||
86 | EVP_CIPHER_get_asn1_iv, | 80 | EVP_CIPHER_get_asn1_iv, |
87 | }; | 81 | }; |
88 | 82 | ||
89 | EVP_CIPHER *EVP_cast5_ofb() | 83 | EVP_CIPHER *EVP_cast5_ofb(void) |
90 | { | 84 | { |
91 | return(&cast5_ofb_cipher); | 85 | return(&cast5_ofb_cipher); |
92 | } | 86 | } |
93 | 87 | ||
94 | static void cast_ofb_init_key(ctx,key,iv,enc) | 88 | static void cast_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, |
95 | EVP_CIPHER_CTX *ctx; | 89 | unsigned char *iv, int enc) |
96 | unsigned char *key; | ||
97 | unsigned char *iv; | ||
98 | int enc; | ||
99 | { | 90 | { |
100 | ctx->num=0; | 91 | ctx->num=0; |
101 | 92 | ||
@@ -106,11 +97,8 @@ int enc; | |||
106 | CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key); | 97 | CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key); |
107 | } | 98 | } |
108 | 99 | ||
109 | static void cast_ofb_cipher(ctx,out,in,inl) | 100 | static void cast_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, |
110 | EVP_CIPHER_CTX *ctx; | 101 | unsigned char *in, unsigned int inl) |
111 | unsigned char *out; | ||
112 | unsigned char *in; | ||
113 | unsigned int inl; | ||
114 | { | 102 | { |
115 | CAST_ofb64_encrypt( | 103 | CAST_ofb64_encrypt( |
116 | in,out, | 104 | in,out, |