Go to the documentation of this file.
61 #if defined( INC_ALL )
69 #ifndef RIPEMD160_LONG_LOG2
70 #define RIPEMD160_LONG_LOG2 2
79 # if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__)
80 # define ripemd160_block_host_order ripemd160_block_asm_host_order
87 #if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__)
88 #define ripemd160_block_data_order ripemd160_block_host_order
91 #define DATA_ORDER_IS_LITTLE_ENDIAN
93 #define HASH_LONG RIPEMD160_LONG
94 #define HASH_LONG_LOG2 RIPEMD160_LONG_LOG2
95 #define HASH_CTX RIPEMD160_CTX
96 #define HASH_CBLOCK RIPEMD160_CBLOCK
97 #define HASH_LBLOCK RIPEMD160_LBLOCK
98 #define HASH_UPDATE RIPEMD160_Update
99 #define HASH_TRANSFORM RIPEMD160_Transform
100 #define HASH_FINAL RIPEMD160_Final
101 #define HASH_BLOCK_HOST_ORDER ripemd160_block_host_order
102 #define HASH_MAKE_STRING(c,s) do { \
104 ll=(c)->A; HOST_l2c(ll,(s)); \
105 ll=(c)->B; HOST_l2c(ll,(s)); \
106 ll=(c)->C; HOST_l2c(ll,(s)); \
107 ll=(c)->D; HOST_l2c(ll,(s)); \
108 ll=(c)->E; HOST_l2c(ll,(s)); \
110 #if !defined(L_ENDIAN) || defined(ripemd160_block_data_order)
111 #define HASH_BLOCK_DATA_ORDER ripemd160_block_data_order
114 #if defined( INC_ALL )
121 #define F1(x,y,z) ((x)^(y)^(z))
122 #define F2(x,y,z) (((x)&(y))|((~x)&z))
123 #define F3(x,y,z) (((x)|(~y))^(z))
124 #define F4(x,y,z) (((x)&(z))|((y)&(~(z))))
125 #define F5(x,y,z) ((x)^((y)|(~(z))))
130 #define F1(x,y,z) ((x) ^ (y) ^ (z))
131 #define F2(x,y,z) ((((y) ^ (z)) & (x)) ^ (z))
132 #define F3(x,y,z) (((~(y)) | (x)) ^ (z))
133 #define F4(x,y,z) ((((x) ^ (y)) & (z)) ^ (y))
134 #define F5(x,y,z) (((~(z)) | (y)) ^ (x))
137 #define RIPEMD160_A 0x67452301L
138 #define RIPEMD160_B 0xEFCDAB89L
139 #define RIPEMD160_C 0x98BADCFEL
140 #define RIPEMD160_D 0x10325476L
141 #define RIPEMD160_E 0xC3D2E1F0L
143 #if defined( INC_ALL )
149 #define RIP1(a,b,c,d,e,w,s) { \
154 #define RIP2(a,b,c,d,e,w,s,K) { \
155 a+=F2(b,c,d)+X(w)+K; \
159 #define RIP3(a,b,c,d,e,w,s,K) { \
160 a+=F3(b,c,d)+X(w)+K; \
164 #define RIP4(a,b,c,d,e,w,s,K) { \
165 a+=F4(b,c,d)+X(w)+K; \
169 #define RIP5(a,b,c,d,e,w,s,K) { \
170 a+=F5(b,c,d)+X(w)+K; \