Fix path to includes
[hashcat.git] / OpenCL / m01440_a3.cl
index 3756b4e..b341003 100644 (file)
 #define DGST_R3 6
 
 #include "include/kernel_functions.c"
-#include "types_ocl.c"
-#include "common.c"
+#include "OpenCL/types_ocl.c"
+#include "OpenCL/common.c"
 
-#define COMPARE_S "check_single_comp4.c"
-#define COMPARE_M "check_multi_comp4.c"
+#define COMPARE_S "OpenCL/check_single_comp4.c"
+#define COMPARE_M "OpenCL/check_multi_comp4.c"
 
 static void m01440m (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_len, __global pw_t *pws, __global gpu_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset)
 {
@@ -86,22 +86,22 @@ static void m01440m (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_le
     u32 w2_t2[4];
     u32 w3_t2[4];
 
-    w0_t2[0] = swap_workaround (w0[0]);
-    w0_t2[1] = swap_workaround (w0[1]);
-    w0_t2[2] = swap_workaround (w0[2]);
-    w0_t2[3] = swap_workaround (w0[3]);
-    w1_t2[0] = swap_workaround (w1[0]);
-    w1_t2[1] = swap_workaround (w1[1]);
-    w1_t2[2] = swap_workaround (w1[2]);
-    w1_t2[3] = swap_workaround (w1[3]);
-    w2_t2[0] = swap_workaround (w2[0]);
-    w2_t2[1] = swap_workaround (w2[1]);
-    w2_t2[2] = swap_workaround (w2[2]);
-    w2_t2[3] = swap_workaround (w2[3]);
-    w3_t2[0] = swap_workaround (w3[0]);
-    w3_t2[1] = swap_workaround (w3[1]);
-    w3_t2[2] = swap_workaround (w3[2]);
-    w3_t2[3] = swap_workaround (w3[3]);
+    w0_t2[0] = swap32 (w0[0]);
+    w0_t2[1] = swap32 (w0[1]);
+    w0_t2[2] = swap32 (w0[2]);
+    w0_t2[3] = swap32 (w0[3]);
+    w1_t2[0] = swap32 (w1[0]);
+    w1_t2[1] = swap32 (w1[1]);
+    w1_t2[2] = swap32 (w1[2]);
+    w1_t2[3] = swap32 (w1[3]);
+    w2_t2[0] = swap32 (w2[0]);
+    w2_t2[1] = swap32 (w2[1]);
+    w2_t2[2] = swap32 (w2[2]);
+    w2_t2[3] = swap32 (w2[3]);
+    w3_t2[0] = swap32 (w3[0]);
+    w3_t2[1] = swap32 (w3[1]);
+    w3_t2[2] = swap32 (w3[2]);
+    w3_t2[3] = swap32 (w3[3]);
 
     switch_buffer_by_offset (w0_t2, w1_t2, w2_t2, w3_t2, salt_len);
 
@@ -126,20 +126,20 @@ static void m01440m (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_le
      * sha256
      */
 
-    u32 w0_t = swap_workaround (w0_t2[0]);
-    u32 w1_t = swap_workaround (w0_t2[1]);
-    u32 w2_t = swap_workaround (w0_t2[2]);
-    u32 w3_t = swap_workaround (w0_t2[3]);
-    u32 w4_t = swap_workaround (w1_t2[0]);
-    u32 w5_t = swap_workaround (w1_t2[1]);
-    u32 w6_t = swap_workaround (w1_t2[2]);
-    u32 w7_t = swap_workaround (w1_t2[3]);
-    u32 w8_t = swap_workaround (w2_t2[0]);
-    u32 w9_t = swap_workaround (w2_t2[1]);
-    u32 wa_t = swap_workaround (w2_t2[2]);
-    u32 wb_t = swap_workaround (w2_t2[3]);
-    u32 wc_t = swap_workaround (w3_t2[0]);
-    u32 wd_t = swap_workaround (w3_t2[1]);
+    u32 w0_t = swap32 (w0_t2[0]);
+    u32 w1_t = swap32 (w0_t2[1]);
+    u32 w2_t = swap32 (w0_t2[2]);
+    u32 w3_t = swap32 (w0_t2[3]);
+    u32 w4_t = swap32 (w1_t2[0]);
+    u32 w5_t = swap32 (w1_t2[1]);
+    u32 w6_t = swap32 (w1_t2[2]);
+    u32 w7_t = swap32 (w1_t2[3]);
+    u32 w8_t = swap32 (w2_t2[0]);
+    u32 w9_t = swap32 (w2_t2[1]);
+    u32 wa_t = swap32 (w2_t2[2]);
+    u32 wb_t = swap32 (w2_t2[3]);
+    u32 wc_t = swap32 (w3_t2[0]);
+    u32 wd_t = swap32 (w3_t2[1]);
     u32 we_t = 0;
     u32 wf_t = pw_salt_len * 8;
 
@@ -308,22 +308,22 @@ static void m01440s (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_le
     u32 w2_t2[4];
     u32 w3_t2[4];
 
-    w0_t2[0] = swap_workaround (w0[0]);
-    w0_t2[1] = swap_workaround (w0[1]);
-    w0_t2[2] = swap_workaround (w0[2]);
-    w0_t2[3] = swap_workaround (w0[3]);
-    w1_t2[0] = swap_workaround (w1[0]);
-    w1_t2[1] = swap_workaround (w1[1]);
-    w1_t2[2] = swap_workaround (w1[2]);
-    w1_t2[3] = swap_workaround (w1[3]);
-    w2_t2[0] = swap_workaround (w2[0]);
-    w2_t2[1] = swap_workaround (w2[1]);
-    w2_t2[2] = swap_workaround (w2[2]);
-    w2_t2[3] = swap_workaround (w2[3]);
-    w3_t2[0] = swap_workaround (w3[0]);
-    w3_t2[1] = swap_workaround (w3[1]);
-    w3_t2[2] = swap_workaround (w3[2]);
-    w3_t2[3] = swap_workaround (w3[3]);
+    w0_t2[0] = swap32 (w0[0]);
+    w0_t2[1] = swap32 (w0[1]);
+    w0_t2[2] = swap32 (w0[2]);
+    w0_t2[3] = swap32 (w0[3]);
+    w1_t2[0] = swap32 (w1[0]);
+    w1_t2[1] = swap32 (w1[1]);
+    w1_t2[2] = swap32 (w1[2]);
+    w1_t2[3] = swap32 (w1[3]);
+    w2_t2[0] = swap32 (w2[0]);
+    w2_t2[1] = swap32 (w2[1]);
+    w2_t2[2] = swap32 (w2[2]);
+    w2_t2[3] = swap32 (w2[3]);
+    w3_t2[0] = swap32 (w3[0]);
+    w3_t2[1] = swap32 (w3[1]);
+    w3_t2[2] = swap32 (w3[2]);
+    w3_t2[3] = swap32 (w3[3]);
 
     switch_buffer_by_offset (w0_t2, w1_t2, w2_t2, w3_t2, salt_len);
 
@@ -348,20 +348,20 @@ static void m01440s (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_le
      * sha256
      */
 
-    u32 w0_t = swap_workaround (w0_t2[0]);
-    u32 w1_t = swap_workaround (w0_t2[1]);
-    u32 w2_t = swap_workaround (w0_t2[2]);
-    u32 w3_t = swap_workaround (w0_t2[3]);
-    u32 w4_t = swap_workaround (w1_t2[0]);
-    u32 w5_t = swap_workaround (w1_t2[1]);
-    u32 w6_t = swap_workaround (w1_t2[2]);
-    u32 w7_t = swap_workaround (w1_t2[3]);
-    u32 w8_t = swap_workaround (w2_t2[0]);
-    u32 w9_t = swap_workaround (w2_t2[1]);
-    u32 wa_t = swap_workaround (w2_t2[2]);
-    u32 wb_t = swap_workaround (w2_t2[3]);
-    u32 wc_t = swap_workaround (w3_t2[0]);
-    u32 wd_t = swap_workaround (w3_t2[1]);
+    u32 w0_t = swap32 (w0_t2[0]);
+    u32 w1_t = swap32 (w0_t2[1]);
+    u32 w2_t = swap32 (w0_t2[2]);
+    u32 w3_t = swap32 (w0_t2[3]);
+    u32 w4_t = swap32 (w1_t2[0]);
+    u32 w5_t = swap32 (w1_t2[1]);
+    u32 w6_t = swap32 (w1_t2[2]);
+    u32 w7_t = swap32 (w1_t2[3]);
+    u32 w8_t = swap32 (w2_t2[0]);
+    u32 w9_t = swap32 (w2_t2[1]);
+    u32 wa_t = swap32 (w2_t2[2]);
+    u32 wb_t = swap32 (w2_t2[3]);
+    u32 wc_t = swap32 (w3_t2[0]);
+    u32 wd_t = swap32 (w3_t2[1]);
     u32 we_t = 0;
     u32 wf_t = pw_salt_len * 8;