diff --git a/run/opencl/opencl_bitlocker.h b/run/opencl/opencl_bitlocker.h index b337103336..a6be3e511d 100644 --- a/run/opencl/opencl_bitlocker.h +++ b/run/opencl/opencl_bitlocker.h @@ -19,7 +19,8 @@ #ifndef _BITCRACKER_H #define _BITCRACKER_H -#define ROR(x, i) (rotate((x), 32U - (i))) +#include "opencl_rotate.h" +#define ROR(x, i) ror32(x, i) #define SCHEDULE0() \ schedule0 = schedule16 + schedule25 \ diff --git a/run/opencl/opencl_twofish.h b/run/opencl/opencl_twofish.h index 549f0c56b8..10703e6ab8 100644 --- a/run/opencl/opencl_twofish.h +++ b/run/opencl/opencl_twofish.h @@ -38,6 +38,7 @@ #define OPENCL_TWOFISH_H_ #include "opencl_misc.h" +#include "opencl_rotate.h" typedef uchar Twofish_Byte; typedef uint Twofish_UInt32; @@ -49,7 +50,7 @@ typedef struct { #define UINT32_MASK ( (((UInt32)2)<<31) - 1 ) #define ROL32( x, n ) rotate((x), (uint)(n)) -#define ROR32( x, n ) rotate((x), (32U - (n))) +#define ROR32( x, n ) ror32(x, n) #if __OS_X__ #define LARGE_Q_TABLE 0 diff --git a/run/opencl/pwsafe_kernel.cl b/run/opencl/pwsafe_kernel.cl index ab062cafa1..5126c05a49 100644 --- a/run/opencl/pwsafe_kernel.cl +++ b/run/opencl/pwsafe_kernel.cl @@ -6,6 +6,7 @@ */ #include "opencl_device_info.h" #include "opencl_misc.h" +#include "opencl_rotate.h" #if HAVE_LUT3 #define Ch(x, y, z) lut3(x, y, z, 0xca) @@ -28,7 +29,7 @@ #endif #endif -#define ror(x,n) rotate(x, 32U-n) +#define ror(x, n) ror32(x, n) #define Sigma0(x) ((ror(x, 2)) ^ (ror(x, 13)) ^ (ror(x, 22))) #define Sigma1(x) ((ror(x, 6)) ^ (ror(x, 11)) ^ (ror(x, 25)))