diff options
Diffstat (limited to 'src/lib/libcrypto/cast/c_enc.c')
-rw-r--r-- | src/lib/libcrypto/cast/c_enc.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/libcrypto/cast/c_enc.c b/src/lib/libcrypto/cast/c_enc.c index e80f65b698..2ae54f5cfb 100644 --- a/src/lib/libcrypto/cast/c_enc.c +++ b/src/lib/libcrypto/cast/c_enc.c | |||
@@ -60,9 +60,10 @@ | |||
60 | #include "cast_lcl.h" | 60 | #include "cast_lcl.h" |
61 | 61 | ||
62 | #ifndef OPENBSD_CAST_ASM | 62 | #ifndef OPENBSD_CAST_ASM |
63 | void CAST_encrypt(CAST_LONG *data, CAST_KEY *key) | 63 | void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key) |
64 | { | 64 | { |
65 | register CAST_LONG l,r,*k,t; | 65 | register CAST_LONG l,r,t; |
66 | const register CAST_LONG *k; | ||
66 | 67 | ||
67 | k= &(key->data[0]); | 68 | k= &(key->data[0]); |
68 | l=data[0]; | 69 | l=data[0]; |
@@ -92,9 +93,10 @@ void CAST_encrypt(CAST_LONG *data, CAST_KEY *key) | |||
92 | data[0]=r&0xffffffffL; | 93 | data[0]=r&0xffffffffL; |
93 | } | 94 | } |
94 | 95 | ||
95 | void CAST_decrypt(CAST_LONG *data, CAST_KEY *key) | 96 | void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key) |
96 | { | 97 | { |
97 | register CAST_LONG l,r,*k,t; | 98 | register CAST_LONG l,r,t; |
99 | const register CAST_LONG *k; | ||
98 | 100 | ||
99 | k= &(key->data[0]); | 101 | k= &(key->data[0]); |
100 | l=data[0]; | 102 | l=data[0]; |
@@ -126,7 +128,7 @@ void CAST_decrypt(CAST_LONG *data, CAST_KEY *key) | |||
126 | #endif | 128 | #endif |
127 | 129 | ||
128 | void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, | 130 | void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, |
129 | CAST_KEY *ks, unsigned char *iv, int enc) | 131 | const CAST_KEY *ks, unsigned char *iv, int enc) |
130 | { | 132 | { |
131 | register CAST_LONG tin0,tin1; | 133 | register CAST_LONG tin0,tin1; |
132 | register CAST_LONG tout0,tout1,xor0,xor1; | 134 | register CAST_LONG tout0,tout1,xor0,xor1; |
@@ -206,4 +208,3 @@ void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, | |||
206 | tin0=tin1=tout0=tout1=xor0=xor1=0; | 208 | tin0=tin1=tout0=tout1=xor0=xor1=0; |
207 | tin[0]=tin[1]=0; | 209 | tin[0]=tin[1]=0; |
208 | } | 210 | } |
209 | |||