diff --git a/OpenCL/inc_hash_functions.cl b/OpenCL/inc_hash_functions.cl index 28926aed8..b895af3f1 100644 --- a/OpenCL/inc_hash_functions.cl +++ b/OpenCL/inc_hash_functions.cl @@ -136,26 +136,30 @@ #define SHA1_F2o(x,y,z) (SHA1_F2 ((x), (y), (z))) #endif -#define SHA1_STEP_S(f,a,b,c,d,e,x) \ -{ \ - e = __add3_S (e, x, f (b, c, d)); \ - e = __add3_S (e, K, rotl32_S (a, 5u)); \ - b = rotl32_S (b, 30u); \ -} - -#define SHA1_STEP(f,a,b,c,d,e,x) \ +#define SHA1_STEP_S(f,a,b,c,d,e,x) \ { \ - e = __add3 (e, x, f (b, c, d)); \ - e = __add3 (e, K, rotl32 (a, 5u)); \ - b = rotl32 (b, 30u); \ + e += K; \ + e = __add3_S (e, x, f (b, c, d)); \ + e += rotl32_S (a, 5u); \ + b = rotl32_S (b, 30u); \ } +#define SHA1_STEP(f,a,b,c,d,e,x) \ +{ \ + e += K; \ + e = __add3 (e, x, f (b, c, d)); \ + e += rotl32 (a, 5u); \ + b = rotl32 (b, 30u); \ +} + +/* #define SHA1_STEP0(f,a,b,c,d,e,x) \ { \ e = __add3 (e, K, f (b, c, d)); \ e += rotl32 (a, 5u); \ b = rotl32 (b, 30u); \ } +*/ #define SHA1_STEPX(f,a,b,c,d,e,x) \ { \