diff options
| author | markus <> | 2002-09-05 12:51:50 +0000 |
|---|---|---|
| committer | markus <> | 2002-09-05 12:51:50 +0000 |
| commit | 15b5d84f9da2ce4bfae8580e56e34a859f74ad71 (patch) | |
| tree | bf939e82d7fd73cc8a01cf6959002209972091bc /src/lib/libcrypto/des/cbc_cksm.c | |
| parent | 027351f729b9e837200dae6e1520cda6577ab930 (diff) | |
| download | openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.tar.gz openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.tar.bz2 openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.zip | |
import openssl-0.9.7-beta1
Diffstat (limited to 'src/lib/libcrypto/des/cbc_cksm.c')
| -rw-r--r-- | src/lib/libcrypto/des/cbc_cksm.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/lib/libcrypto/des/cbc_cksm.c b/src/lib/libcrypto/des/cbc_cksm.c index edfdec8a0f..6c5305b99d 100644 --- a/src/lib/libcrypto/des/cbc_cksm.c +++ b/src/lib/libcrypto/des/cbc_cksm.c | |||
| @@ -58,21 +58,15 @@ | |||
| 58 | 58 | ||
| 59 | #include "des_locl.h" | 59 | #include "des_locl.h" |
| 60 | 60 | ||
| 61 | DES_LONG des_cbc_cksum(input, output, length, schedule, ivec) | 61 | DES_LONG DES_cbc_cksum(const unsigned char *in, DES_cblock *output, |
| 62 | des_cblock (*input); | 62 | long length, DES_key_schedule *schedule, |
| 63 | des_cblock (*output); | 63 | const_DES_cblock *ivec) |
| 64 | long length; | ||
| 65 | des_key_schedule schedule; | ||
| 66 | des_cblock (*ivec); | ||
| 67 | { | 64 | { |
| 68 | register DES_LONG tout0,tout1,tin0,tin1; | 65 | register DES_LONG tout0,tout1,tin0,tin1; |
| 69 | register long l=length; | 66 | register long l=length; |
| 70 | DES_LONG tin[2]; | 67 | DES_LONG tin[2]; |
| 71 | unsigned char *in,*out,*iv; | 68 | unsigned char *out = &(*output)[0]; |
| 72 | 69 | const unsigned char *iv = &(*ivec)[0]; | |
| 73 | in=(unsigned char *)input; | ||
| 74 | out=(unsigned char *)output; | ||
| 75 | iv=(unsigned char *)ivec; | ||
| 76 | 70 | ||
| 77 | c2l(iv,tout0); | 71 | c2l(iv,tout0); |
| 78 | c2l(iv,tout1); | 72 | c2l(iv,tout1); |
| @@ -88,7 +82,7 @@ des_cblock (*ivec); | |||
| 88 | 82 | ||
| 89 | tin0^=tout0; tin[0]=tin0; | 83 | tin0^=tout0; tin[0]=tin0; |
| 90 | tin1^=tout1; tin[1]=tin1; | 84 | tin1^=tout1; tin[1]=tin1; |
| 91 | des_encrypt((DES_LONG *)tin,schedule,DES_ENCRYPT); | 85 | DES_encrypt1((DES_LONG *)tin,schedule,DES_ENCRYPT); |
| 92 | /* fix 15/10/91 eay - thanks to keithr@sco.COM */ | 86 | /* fix 15/10/91 eay - thanks to keithr@sco.COM */ |
| 93 | tout0=tin[0]; | 87 | tout0=tin[0]; |
| 94 | tout1=tin[1]; | 88 | tout1=tin[1]; |
