summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/des/ncbc_enc.c
diff options
context:
space:
mode:
authorbeck <>2002-05-15 02:29:21 +0000
committerbeck <>2002-05-15 02:29:21 +0000
commitb64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9 (patch)
treefa27cf82a1250b64ed3bf5f4a18c7354d470bbcc /src/lib/libcrypto/des/ncbc_enc.c
parente471e1ea98d673597b182ea85f29e30c97cd08b5 (diff)
downloadopenbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.gz
openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.bz2
openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.zip
OpenSSL 0.9.7 stable 2002 05 08 merge
Diffstat (limited to 'src/lib/libcrypto/des/ncbc_enc.c')
-rw-r--r--src/lib/libcrypto/des/ncbc_enc.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/libcrypto/des/ncbc_enc.c b/src/lib/libcrypto/des/ncbc_enc.c
index b8db07b199..fda23d522f 100644
--- a/src/lib/libcrypto/des/ncbc_enc.c
+++ b/src/lib/libcrypto/des/ncbc_enc.c
@@ -1,8 +1,8 @@
1/* crypto/des/ncbc_enc.c */ 1/* crypto/des/ncbc_enc.c */
2/* 2/*
3 * #included by: 3 * #included by:
4 * cbc_enc.c (des_cbc_encrypt) 4 * cbc_enc.c (DES_cbc_encrypt)
5 * des_enc.c (des_ncbc_encrypt) 5 * des_enc.c (DES_ncbc_encrypt)
6 */ 6 */
7/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 7/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
8 * All rights reserved. 8 * All rights reserved.
@@ -64,11 +64,11 @@
64#include "des_locl.h" 64#include "des_locl.h"
65 65
66#ifdef CBC_ENC_C__DONT_UPDATE_IV 66#ifdef CBC_ENC_C__DONT_UPDATE_IV
67void des_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, 67void DES_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
68 des_key_schedule schedule, des_cblock *ivec, int enc) 68 DES_key_schedule *_schedule, DES_cblock *ivec, int enc)
69#else 69#else
70void des_ncbc_encrypt(const unsigned char *in, unsigned char *out, long length, 70void DES_ncbc_encrypt(const unsigned char *in, unsigned char *out, long length,
71 des_key_schedule schedule, des_cblock *ivec, int enc) 71 DES_key_schedule *_schedule, DES_cblock *ivec, int enc)
72#endif 72#endif
73 { 73 {
74 register DES_LONG tin0,tin1; 74 register DES_LONG tin0,tin1;
@@ -89,7 +89,7 @@ void des_ncbc_encrypt(const unsigned char *in, unsigned char *out, long length,
89 c2l(in,tin1); 89 c2l(in,tin1);
90 tin0^=tout0; tin[0]=tin0; 90 tin0^=tout0; tin[0]=tin0;
91 tin1^=tout1; tin[1]=tin1; 91 tin1^=tout1; tin[1]=tin1;
92 des_encrypt1((DES_LONG *)tin,schedule,DES_ENCRYPT); 92 DES_encrypt1((DES_LONG *)tin,_schedule,DES_ENCRYPT);
93 tout0=tin[0]; l2c(tout0,out); 93 tout0=tin[0]; l2c(tout0,out);
94 tout1=tin[1]; l2c(tout1,out); 94 tout1=tin[1]; l2c(tout1,out);
95 } 95 }
@@ -98,7 +98,7 @@ void des_ncbc_encrypt(const unsigned char *in, unsigned char *out, long length,
98 c2ln(in,tin0,tin1,l+8); 98 c2ln(in,tin0,tin1,l+8);
99 tin0^=tout0; tin[0]=tin0; 99 tin0^=tout0; tin[0]=tin0;
100 tin1^=tout1; tin[1]=tin1; 100 tin1^=tout1; tin[1]=tin1;
101 des_encrypt1((DES_LONG *)tin,schedule,DES_ENCRYPT); 101 DES_encrypt1((DES_LONG *)tin,_schedule,DES_ENCRYPT);
102 tout0=tin[0]; l2c(tout0,out); 102 tout0=tin[0]; l2c(tout0,out);
103 tout1=tin[1]; l2c(tout1,out); 103 tout1=tin[1]; l2c(tout1,out);
104 } 104 }
@@ -116,7 +116,7 @@ void des_ncbc_encrypt(const unsigned char *in, unsigned char *out, long length,
116 { 116 {
117 c2l(in,tin0); tin[0]=tin0; 117 c2l(in,tin0); tin[0]=tin0;
118 c2l(in,tin1); tin[1]=tin1; 118 c2l(in,tin1); tin[1]=tin1;
119 des_encrypt1((DES_LONG *)tin,schedule,DES_DECRYPT); 119 DES_encrypt1((DES_LONG *)tin,_schedule,DES_DECRYPT);
120 tout0=tin[0]^xor0; 120 tout0=tin[0]^xor0;
121 tout1=tin[1]^xor1; 121 tout1=tin[1]^xor1;
122 l2c(tout0,out); 122 l2c(tout0,out);
@@ -128,7 +128,7 @@ void des_ncbc_encrypt(const unsigned char *in, unsigned char *out, long length,
128 { 128 {
129 c2l(in,tin0); tin[0]=tin0; 129 c2l(in,tin0); tin[0]=tin0;
130 c2l(in,tin1); tin[1]=tin1; 130 c2l(in,tin1); tin[1]=tin1;
131 des_encrypt1((DES_LONG *)tin,schedule,DES_DECRYPT); 131 DES_encrypt1((DES_LONG *)tin,_schedule,DES_DECRYPT);
132 tout0=tin[0]^xor0; 132 tout0=tin[0]^xor0;
133 tout1=tin[1]^xor1; 133 tout1=tin[1]^xor1;
134 l2cn(tout0,tout1,out,l+8); 134 l2cn(tout0,tout1,out,l+8);