summaryrefslogtreecommitdiff
path: root/crypto/des/fcrypt_b.c
diff options
context:
space:
mode:
authorlevitte <levitte>2010-01-27 11:10:46 +0000
committerlevitte <levitte>2010-01-27 11:10:46 +0000
commit61f7c8378a6ebcb13bca380f96286c342990e17b (patch)
tree40dfae68bee48b7cceb0281d9f8b1561c4473716 /crypto/des/fcrypt_b.c
parent79594e374c833aa051142139404cb199383ff4b8 (diff)
downloadopenssl-61f7c8378a6ebcb13bca380f96286c342990e17b.tar.gz
Merge main -> VMS_64BITBRANCH_VMS_64BIT
Diffstat (limited to 'crypto/des/fcrypt_b.c')
-rw-r--r--crypto/des/fcrypt_b.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/crypto/des/fcrypt_b.c b/crypto/des/fcrypt_b.c
index 1544634bc..882281693 100644
--- a/crypto/des/fcrypt_b.c
+++ b/crypto/des/fcrypt_b.c
@@ -58,7 +58,7 @@
#include <stdio.h>
-/* This version of crypt has been developed from my MIT compatable
+/* This version of crypt has been developed from my MIT compatible
* DES library.
* The library is available at pub/Crypto/DES at ftp.psy.uq.oz.au
* Eric Young (eay@cryptsoft.com)
@@ -77,15 +77,12 @@
#define HPERM_OP(a,t,n,m) ((t)=((((a)<<(16-(n)))^(a))&(m)),\
(a)=(a)^(t)^(t>>(16-(n))))\
-void fcrypt_body(out, ks, Eswap0, Eswap1)
-DES_LONG *out;
-des_key_schedule ks;
-DES_LONG Eswap0;
-DES_LONG Eswap1;
+void fcrypt_body(DES_LONG *out, DES_key_schedule *ks, DES_LONG Eswap0,
+ DES_LONG Eswap1)
{
register DES_LONG l,r,t,u;
#ifdef DES_PTR
- register unsigned char *des_SP=(unsigned char *)des_SPtrans;
+ register const unsigned char *des_SP=(const unsigned char *)DES_SPtrans;
#endif
register DES_LONG *s;
register int j;
@@ -100,15 +97,13 @@ DES_LONG Eswap1;
for (j=0; j<25; j++)
{
-#ifdef DES_UNROLL
+#ifndef DES_UNROLL
register int i;
- for (i=0; i<32; i+=8)
+ for (i=0; i<32; i+=4)
{
D_ENCRYPT(l,r,i+0); /* 1 */
D_ENCRYPT(r,l,i+2); /* 2 */
- D_ENCRYPT(l,r,i+4); /* 1 */
- D_ENCRYPT(r,l,i+6); /* 2 */
}
#else
D_ENCRYPT(l,r, 0); /* 1 */