Fix ghastly DES declarations, and all consequential warnings.
[openssl.git] / crypto / des / cfb64enc.c
index 403da479dfcaf28154b9db8f1cfff13d2f8652df..9434ddad9e5c033c61a3de510c69c3428ba0c50d 100644 (file)
  */
 
 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];