diff options
author | beck <> | 1999-09-29 04:37:45 +0000 |
---|---|---|
committer | beck <> | 1999-09-29 04:37:45 +0000 |
commit | de8f24ea083384bb66b32ec105dc4743c5663cdf (patch) | |
tree | 1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/evp/e_cbc_r5.c | |
parent | cb929d29896bcb87c2a97417fbd03e50078fc178 (diff) | |
download | openbsd-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.c | 26 |
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 | ||
67 | static void r_32_12_16_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | 66 | static 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); |
69 | static void r_32_12_16_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | 68 | static 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 | ||
72 | static void r_32_12_16_cbc_init_key(); | ||
73 | static void r_32_12_16_cbc_cipher(); | ||
74 | #endif | ||
75 | |||
76 | static EVP_CIPHER rc5_32_12_16_cbc_cipher= | 70 | static 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 | ||
89 | EVP_CIPHER *EVP_rc5_32_12_16_cbc() | 83 | EVP_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 | ||
94 | static void r_32_12_16_cbc_init_key(ctx,key,iv,enc) | 88 | static void r_32_12_16_cbc_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 | 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 | ||
108 | static void r_32_12_16_cbc_cipher(ctx,out,in,inl) | 99 | static void r_32_12_16_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, |
109 | EVP_CIPHER_CTX *ctx; | 100 | unsigned char *in, unsigned int inl) |
110 | unsigned char *out; | ||
111 | unsigned char *in; | ||
112 | unsigned int inl; | ||
113 | { | 101 | { |
114 | RC5_32_cbc_encrypt( | 102 | RC5_32_cbc_encrypt( |
115 | in,out,(long)inl, | 103 | in,out,(long)inl, |