Since there has been reports of clashes between OpenSSL's
[openssl.git] / crypto / des / ncbc_enc.c
index e0e67a417d5fbb27a779574560ce0bed7d8f7e3f..b8db07b199d6017933e8506ec4a56b7fd38c1a21 100644 (file)
@@ -1,4 +1,9 @@
 /* crypto/des/ncbc_enc.c */
 /* crypto/des/ncbc_enc.c */
+/*
+ * #included by:
+ *    cbc_enc.c  (des_cbc_encrypt)
+ *    des_enc.c  (des_ncbc_encrypt)
+ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -84,7 +89,7 @@ void des_ncbc_encrypt(const unsigned char *in, unsigned char *out, long length,
                        c2l(in,tin1);
                        tin0^=tout0; tin[0]=tin0;
                        tin1^=tout1; tin[1]=tin1;
                        c2l(in,tin1);
                        tin0^=tout0; tin[0]=tin0;
                        tin1^=tout1; tin[1]=tin1;
-                       des_encrypt((DES_LONG *)tin,schedule,DES_ENCRYPT);
+                       des_encrypt1((DES_LONG *)tin,schedule,DES_ENCRYPT);
                        tout0=tin[0]; l2c(tout0,out);
                        tout1=tin[1]; l2c(tout1,out);
                        }
                        tout0=tin[0]; l2c(tout0,out);
                        tout1=tin[1]; l2c(tout1,out);
                        }
@@ -93,7 +98,7 @@ void des_ncbc_encrypt(const unsigned char *in, unsigned char *out, long length,
                        c2ln(in,tin0,tin1,l+8);
                        tin0^=tout0; tin[0]=tin0;
                        tin1^=tout1; tin[1]=tin1;
                        c2ln(in,tin0,tin1,l+8);
                        tin0^=tout0; tin[0]=tin0;
                        tin1^=tout1; tin[1]=tin1;
-                       des_encrypt((DES_LONG *)tin,schedule,DES_ENCRYPT);
+                       des_encrypt1((DES_LONG *)tin,schedule,DES_ENCRYPT);
                        tout0=tin[0]; l2c(tout0,out);
                        tout1=tin[1]; l2c(tout1,out);
                        }
                        tout0=tin[0]; l2c(tout0,out);
                        tout1=tin[1]; l2c(tout1,out);
                        }
@@ -111,7 +116,7 @@ void des_ncbc_encrypt(const unsigned char *in, unsigned char *out, long length,
                        {
                        c2l(in,tin0); tin[0]=tin0;
                        c2l(in,tin1); tin[1]=tin1;
                        {
                        c2l(in,tin0); tin[0]=tin0;
                        c2l(in,tin1); tin[1]=tin1;
-                       des_encrypt((DES_LONG *)tin,schedule,DES_DECRYPT);
+                       des_encrypt1((DES_LONG *)tin,schedule,DES_DECRYPT);
                        tout0=tin[0]^xor0;
                        tout1=tin[1]^xor1;
                        l2c(tout0,out);
                        tout0=tin[0]^xor0;
                        tout1=tin[1]^xor1;
                        l2c(tout0,out);
@@ -123,7 +128,7 @@ void des_ncbc_encrypt(const unsigned char *in, unsigned char *out, long length,
                        {
                        c2l(in,tin0); tin[0]=tin0;
                        c2l(in,tin1); tin[1]=tin1;
                        {
                        c2l(in,tin0); tin[0]=tin0;
                        c2l(in,tin1); tin[1]=tin1;
-                       des_encrypt((DES_LONG *)tin,schedule,DES_DECRYPT);
+                       des_encrypt1((DES_LONG *)tin,schedule,DES_DECRYPT);
                        tout0=tin[0]^xor0;
                        tout1=tin[1]^xor1;
                        l2cn(tout0,tout1,out,l+8);
                        tout0=tin[0]^xor0;
                        tout1=tin[1]^xor1;
                        l2cn(tout0,tout1,out,l+8);