Ignore generated ASM.
[openssl.git] / crypto / cast / c_cfb64.c
index c46c375f756f97c17349eda8f8e5d9b0b7bfb445..514c005c325f9326b5b405d280762f3822d3e0d1 100644 (file)
@@ -56,7 +56,7 @@
  * [including the GNU Public Licence.]
  */
 
-#include "cast.h"
+#include <openssl/cast.h>
 #include "cast_lcl.h"
 
 /* The input and output encrypted as though 64bit cfb mode is being
  * 64bit block we have used is contained in *num;
  */
 
-void CAST_cfb64_encrypt(in, out, length, schedule, ivec, num, encrypt)
-unsigned char *in;
-unsigned char *out;
-long length;
-CAST_KEY *schedule;
-unsigned char *ivec;
-int *num;
-int encrypt;
+void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out,
+                       long length, CAST_KEY *schedule, unsigned char *ivec,
+                       int *num, int enc)
        {
        register CAST_LONG v0,v1,t;
        register int n= *num;
@@ -79,8 +74,8 @@ int encrypt;
        CAST_LONG ti[2];
        unsigned char *iv,c,cc;
 
-       iv=(unsigned char *)ivec;
-       if (encrypt)
+       iv=ivec;
+       if (enc)
                {
                while (l--)
                        {
@@ -89,10 +84,10 @@ int encrypt;
                                n2l(iv,v0); ti[0]=v0;
                                n2l(iv,v1); ti[1]=v1;
                                CAST_encrypt((CAST_LONG *)ti,schedule);
-                               iv=(unsigned char *)ivec;
+                               iv=ivec;
                                t=ti[0]; l2n(t,iv);
                                t=ti[1]; l2n(t,iv);
-                               iv=(unsigned char *)ivec;
+                               iv=ivec;
                                }
                        c= *(in++)^iv[n];
                        *(out++)=c;
@@ -109,10 +104,10 @@ int encrypt;
                                n2l(iv,v0); ti[0]=v0;
                                n2l(iv,v1); ti[1]=v1;
                                CAST_encrypt((CAST_LONG *)ti,schedule);
-                               iv=(unsigned char *)ivec;
+                               iv=ivec;
                                t=ti[0]; l2n(t,iv);
                                t=ti[1]; l2n(t,iv);
-                               iv=(unsigned char *)ivec;
+                               iv=ivec;
                                }
                        cc= *(in++);
                        c=iv[n];