summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/e_cbc_r5.c
diff options
context:
space:
mode:
authorbeck <>1999-09-29 04:37:45 +0000
committerbeck <>1999-09-29 04:37:45 +0000
commitde8f24ea083384bb66b32ec105dc4743c5663cdf (patch)
tree1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/evp/e_cbc_r5.c
parentcb929d29896bcb87c2a97417fbd03e50078fc178 (diff)
downloadopenbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.gz
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.bz2
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.zip
OpenSSL 0.9.4 merge
Diffstat (limited to 'src/lib/libcrypto/evp/e_cbc_r5.c')
-rw-r--r--src/lib/libcrypto/evp/e_cbc_r5.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/lib/libcrypto/evp/e_cbc_r5.c b/src/lib/libcrypto/evp/e_cbc_r5.c
index f7d46ca91f..cea3fe333a 100644
--- a/src/lib/libcrypto/evp/e_cbc_r5.c
+++ b/src/lib/libcrypto/evp/e_cbc_r5.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 r_32_12_16_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, 66static void r_32_12_16_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
68 unsigned char *iv,int enc); 67 unsigned char *iv,int enc);
69static void r_32_12_16_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, 68static void r_32_12_16_cbc_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 r_32_12_16_cbc_init_key();
73static void r_32_12_16_cbc_cipher();
74#endif
75
76static EVP_CIPHER rc5_32_12_16_cbc_cipher= 70static EVP_CIPHER rc5_32_12_16_cbc_cipher=
77 { 71 {
78 NID_rc5_cbc, 72 NID_rc5_cbc,
@@ -86,16 +80,13 @@ static EVP_CIPHER rc5_32_12_16_cbc_cipher=
86 NULL, 80 NULL,
87 }; 81 };
88 82
89EVP_CIPHER *EVP_rc5_32_12_16_cbc() 83EVP_CIPHER *EVP_rc5_32_12_16_cbc(void)
90 { 84 {
91 return(&rc5_32_12_16_cbc_cipher); 85 return(&rc5_32_12_16_cbc_cipher);
92 } 86 }
93 87
94static void r_32_12_16_cbc_init_key(ctx,key,iv,enc) 88static void r_32_12_16_cbc_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 (iv != NULL) 91 if (iv != NULL)
101 memcpy(&(ctx->oiv[0]),iv,8); 92 memcpy(&(ctx->oiv[0]),iv,8);
@@ -105,11 +96,8 @@ int enc;
105 key,RC5_12_ROUNDS); 96 key,RC5_12_ROUNDS);
106 } 97 }
107 98
108static void r_32_12_16_cbc_cipher(ctx,out,in,inl) 99static void r_32_12_16_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
109EVP_CIPHER_CTX *ctx; 100 unsigned char *in, unsigned int inl)
110unsigned char *out;
111unsigned char *in;
112unsigned int inl;
113 { 101 {
114 RC5_32_cbc_encrypt( 102 RC5_32_cbc_encrypt(
115 in,out,(long)inl, 103 in,out,(long)inl,