Don't install e_os.h in include/openssl, use it only as a local
[oweals/openssl.git] / crypto / des / cbc_enc.c
index a84a53633cd52c25279f6159ec3eaf8ec37ff980..4ccabc911adc12cd5b54ba35f201b74ff9158269 100644 (file)
 
 #include "des_locl.h"
 
-void des_cbc_encrypt(input, output, length, schedule, ivec, enc)
-des_cblock (*input);
-des_cblock (*output);
-long length;
-des_key_schedule schedule;
-des_cblock (*ivec);
-int enc;
+/* Note that this is inconsistent with other DES functions, in that it doesn't
+   update ivec */
+void des_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
+            des_key_schedule schedule, des_cblock *ivec, int enc)
        {
        register DES_LONG tin0,tin1;
        register DES_LONG tout0,tout1,xor0,xor1;
-       register unsigned char *in,*out;
        register long l=length;
        DES_LONG tin[2];
        unsigned char *iv;
 
-       in=(unsigned char *)input;
-       out=(unsigned char *)output;
-       iv=(unsigned char *)ivec;
+       iv = &(*ivec)[0];
 
        if (enc)
                {