summaryrefslogtreecommitdiffstats
path: root/crypto/des/cfb64enc.c
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>1999-02-13 18:52:38 +0000
committerBen Laurie <ben@openssl.org>1999-02-13 18:52:38 +0000
commit4e31df2cd73dbb659fd8a6eca6270fac661c072d (patch)
treee27cb10012ceeaf8dd433b5cf12b6fd7e73fdb8a /crypto/des/cfb64enc.c
parente4119b931172a6a28e2ecb65ef41c6f23b89d09c (diff)
Fix ghastly DES declarations, and all consequential warnings.
Diffstat (limited to 'crypto/des/cfb64enc.c')
-rw-r--r--crypto/des/cfb64enc.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/crypto/des/cfb64enc.c b/crypto/des/cfb64enc.c
index 403da479df..9434ddad9e 100644
--- a/crypto/des/cfb64enc.c
+++ b/crypto/des/cfb64enc.c
@@ -64,11 +64,11 @@
*/
void des_cfb64_encrypt(in, out, length, schedule, ivec, num, enc)
-unsigned char *in;
+const unsigned char *in;
unsigned char *out;
long length;
des_key_schedule schedule;
-des_cblock (*ivec);
+des_cblock ivec;
int *num;
int enc;
{
@@ -78,7 +78,7 @@ int enc;
DES_LONG ti[2];
unsigned char *iv,c,cc;
- iv=(unsigned char *)ivec;
+ iv=ivec;
if (enc)
{
while (l--)
@@ -87,12 +87,11 @@ int enc;
{
c2l(iv,v0); ti[0]=v0;
c2l(iv,v1); ti[1]=v1;
- des_encrypt((DES_LONG *)ti,
- schedule,DES_ENCRYPT);
- iv=(unsigned char *)ivec;
+ des_encrypt(ti,schedule,DES_ENCRYPT);
+ iv=ivec;
v0=ti[0]; l2c(v0,iv);
v0=ti[1]; l2c(v0,iv);
- iv=(unsigned char *)ivec;
+ iv=ivec;
}
c= *(in++)^iv[n];
*(out++)=c;
@@ -108,12 +107,11 @@ int enc;
{
c2l(iv,v0); ti[0]=v0;
c2l(iv,v1); ti[1]=v1;
- des_encrypt((DES_LONG *)ti,
- schedule,DES_ENCRYPT);
- iv=(unsigned char *)ivec;
+ des_encrypt(ti,schedule,DES_ENCRYPT);
+ iv=ivec;
v0=ti[0]; l2c(v0,iv);
v0=ti[1]; l2c(v0,iv);
- iv=(unsigned char *)ivec;
+ iv=ivec;
}
cc= *(in++);
c=iv[n];