projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PR: 2632
[oweals/openssl.git]
/
crypto
/
cast
/
c_enc.c
diff --git
a/crypto/cast/c_enc.c
b/crypto/cast/c_enc.c
index ef70c8898121642febcce7162c8aa67a0ca06ccb..357c41ebf08a7864525393bf630d2d0ed49598d3 100644
(file)
--- a/
crypto/cast/c_enc.c
+++ b/
crypto/cast/c_enc.c
@@
-59,9
+59,10
@@
#include <openssl/cast.h>
#include "cast_lcl.h"
#include <openssl/cast.h>
#include "cast_lcl.h"
-void CAST_encrypt(CAST_LONG *data, CAST_KEY *key)
+void CAST_encrypt(CAST_LONG *data,
const
CAST_KEY *key)
{
{
- register CAST_LONG l,r,*k,t;
+ register CAST_LONG l,r,t;
+ const register CAST_LONG *k;
k= &(key->data[0]);
l=data[0];
k= &(key->data[0]);
l=data[0];
@@
-91,9
+92,10
@@
void CAST_encrypt(CAST_LONG *data, CAST_KEY *key)
data[0]=r&0xffffffffL;
}
data[0]=r&0xffffffffL;
}
-void CAST_decrypt(CAST_LONG *data, CAST_KEY *key)
+void CAST_decrypt(CAST_LONG *data,
const
CAST_KEY *key)
{
{
- register CAST_LONG l,r,*k,t;
+ register CAST_LONG l,r,t;
+ const register CAST_LONG *k;
k= &(key->data[0]);
l=data[0];
k= &(key->data[0]);
l=data[0];
@@
-124,14
+126,14
@@
void CAST_decrypt(CAST_LONG *data, CAST_KEY *key)
}
void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
}
void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
-
CAST_KEY *ks, unsigned char *iv, int _encrypt
)
+
const CAST_KEY *ks, unsigned char *iv, int enc
)
{
register CAST_LONG tin0,tin1;
register CAST_LONG tout0,tout1,xor0,xor1;
register long l=length;
CAST_LONG tin[2];
{
register CAST_LONG tin0,tin1;
register CAST_LONG tout0,tout1,xor0,xor1;
register long l=length;
CAST_LONG tin[2];
- if (
_encrypt
)
+ if (
enc
)
{
n2l(iv,tout0);
n2l(iv,tout1);
{
n2l(iv,tout0);
n2l(iv,tout1);
@@
-204,4
+206,3
@@
void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
tin0=tin1=tout0=tout1=xor0=xor1=0;
tin[0]=tin[1]=0;
}
tin0=tin1=tout0=tout1=xor0=xor1=0;
tin[0]=tin[1]=0;
}
-