summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/e_ecb_c.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/evp/e_ecb_c.c')
-rw-r--r--src/lib/libcrypto/evp/e_ecb_c.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/lib/libcrypto/evp/e_ecb_c.c b/src/lib/libcrypto/evp/e_ecb_c.c
index 34e0c18296..ad14e203cb 100644
--- a/src/lib/libcrypto/evp/e_ecb_c.c
+++ b/src/lib/libcrypto/evp/e_ecb_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
67static void cast_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, 66static void cast_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
68 unsigned char *iv,int enc); 67 unsigned char *iv,int enc);
69static void cast_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, 68static void cast_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
70 unsigned char *in, unsigned int inl); 69 unsigned char *in, unsigned int inl);
71#else
72static void cast_ecb_init_key();
73static void cast_ecb_cipher();
74#endif
75
76static EVP_CIPHER cast5_ecb_cipher= 70static EVP_CIPHER cast5_ecb_cipher=
77 { 71 {
78 NID_cast5_ecb, 72 NID_cast5_ecb,
@@ -86,26 +80,20 @@ static EVP_CIPHER cast5_ecb_cipher=
86 NULL, 80 NULL,
87 }; 81 };
88 82
89EVP_CIPHER *EVP_cast5_ecb() 83EVP_CIPHER *EVP_cast5_ecb(void)
90 { 84 {
91 return(&cast5_ecb_cipher); 85 return(&cast5_ecb_cipher);
92 } 86 }
93 87
94static void cast_ecb_init_key(ctx,key,iv,enc) 88static void cast_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
95EVP_CIPHER_CTX *ctx; 89 unsigned char *iv, int enc)
96unsigned char *key;
97unsigned char *iv;
98int enc;
99 { 90 {
100 if (key != NULL) 91 if (key != NULL)
101 CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key); 92 CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key);
102 } 93 }
103 94
104static void cast_ecb_cipher(ctx,out,in,inl) 95static void cast_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
105EVP_CIPHER_CTX *ctx; 96 unsigned char *in, unsigned int inl)
106unsigned char *out;
107unsigned char *in;
108unsigned int inl;
109 { 97 {
110 unsigned int i; 98 unsigned int i;
111 99