summaryrefslogtreecommitdiffstats
path: root/crypto/rc2/rc2_locl.h
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/rc2/rc2_locl.h')
-rw-r--r--crypto/rc2/rc2_locl.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/crypto/rc2/rc2_locl.h b/crypto/rc2/rc2_locl.h
index 05f45b0573..565cd17619 100644
--- a/crypto/rc2/rc2_locl.h
+++ b/crypto/rc2/rc2_locl.h
@@ -1,5 +1,5 @@
/* crypto/rc2/rc2_locl.h */
-/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
@@ -144,3 +144,13 @@
*((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
*((c)++)=(unsigned char)(((l) )&0xff))
+#define C_RC2(n) \
+ t=(x0+(x1& ~x3)+(x2&x3)+ *(p0++))&0xffff; \
+ x0=(t<<1)|(t>>15); \
+ t=(x1+(x2& ~x0)+(x3&x0)+ *(p0++))&0xffff; \
+ x1=(t<<2)|(t>>14); \
+ t=(x2+(x3& ~x1)+(x0&x1)+ *(p0++))&0xffff; \
+ x2=(t<<3)|(t>>13); \
+ t=(x3+(x0& ~x2)+(x1&x2)+ *(p0++))&0xffff; \
+ x3=(t<<5)|(t>>11);
+