Fix path to includes
[hashcat.git] / OpenCL / m00120_a0.cl
index fe682eb..900269c 100644 (file)
 #define DGST_R3 1
 
 #include "include/kernel_functions.c"
-#include "types_ocl.c"
-#include "common.c"
+#include "OpenCL/types_ocl.c"
+#include "OpenCL/common.c"
 #include "include/rp_gpu.h"
 #include "rp.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"
 
 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00120_m04 (__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 rules_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
 {
@@ -143,7 +143,7 @@ __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00120_m04 (__glo
     w1_t[2] |= salt_buf1[2];
     w1_t[3] |= salt_buf1[3];
 
-    append_0x80_4 (w0_t, w1_t, w2_t, w3_t, out_salt_len);
+    append_0x80_4x4 (w0_t, w1_t, w2_t, w3_t, out_salt_len);
 
     w3_t[3] = out_salt_len * 8;
 
@@ -151,22 +151,22 @@ __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00120_m04 (__glo
      * sha1
      */
 
-    w0_t[0] = swap_workaround (w0_t[0]);
-    w0_t[1] = swap_workaround (w0_t[1]);
-    w0_t[2] = swap_workaround (w0_t[2]);
-    w0_t[3] = swap_workaround (w0_t[3]);
-    w1_t[0] = swap_workaround (w1_t[0]);
-    w1_t[1] = swap_workaround (w1_t[1]);
-    w1_t[2] = swap_workaround (w1_t[2]);
-    w1_t[3] = swap_workaround (w1_t[3]);
-    w2_t[0] = swap_workaround (w2_t[0]);
-    w2_t[1] = swap_workaround (w2_t[1]);
-    w2_t[2] = swap_workaround (w2_t[2]);
-    w2_t[3] = swap_workaround (w2_t[3]);
-    w3_t[0] = swap_workaround (w3_t[0]);
-    w3_t[1] = swap_workaround (w3_t[1]);
-    //w3_t[2] = swap_workaround (w3_t[2]);
-    //w3_t[3] = swap_workaround (w3_t[3]);
+    w0_t[0] = swap32 (w0_t[0]);
+    w0_t[1] = swap32 (w0_t[1]);
+    w0_t[2] = swap32 (w0_t[2]);
+    w0_t[3] = swap32 (w0_t[3]);
+    w1_t[0] = swap32 (w1_t[0]);
+    w1_t[1] = swap32 (w1_t[1]);
+    w1_t[2] = swap32 (w1_t[2]);
+    w1_t[3] = swap32 (w1_t[3]);
+    w2_t[0] = swap32 (w2_t[0]);
+    w2_t[1] = swap32 (w2_t[1]);
+    w2_t[2] = swap32 (w2_t[2]);
+    w2_t[3] = swap32 (w2_t[3]);
+    w3_t[0] = swap32 (w3_t[0]);
+    w3_t[1] = swap32 (w3_t[1]);
+    //w3_t[2] = swap32 (w3_t[2]);
+    //w3_t[3] = swap32 (w3_t[3]);
 
     u32 a = SHA1M_A;
     u32 b = SHA1M_B;
@@ -427,7 +427,7 @@ __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00120_s04 (__glo
     w1_t[2] |= salt_buf1[2];
     w1_t[3] |= salt_buf1[3];
 
-    append_0x80_4 (w0_t, w1_t, w2_t, w3_t, out_salt_len);
+    append_0x80_4x4 (w0_t, w1_t, w2_t, w3_t, out_salt_len);
 
     w3_t[3] = out_salt_len * 8;
 
@@ -435,22 +435,22 @@ __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00120_s04 (__glo
      * sha1
      */
 
-    w0_t[0] = swap_workaround (w0_t[0]);
-    w0_t[1] = swap_workaround (w0_t[1]);
-    w0_t[2] = swap_workaround (w0_t[2]);
-    w0_t[3] = swap_workaround (w0_t[3]);
-    w1_t[0] = swap_workaround (w1_t[0]);
-    w1_t[1] = swap_workaround (w1_t[1]);
-    w1_t[2] = swap_workaround (w1_t[2]);
-    w1_t[3] = swap_workaround (w1_t[3]);
-    w2_t[0] = swap_workaround (w2_t[0]);
-    w2_t[1] = swap_workaround (w2_t[1]);
-    w2_t[2] = swap_workaround (w2_t[2]);
-    w2_t[3] = swap_workaround (w2_t[3]);
-    w3_t[0] = swap_workaround (w3_t[0]);
-    w3_t[1] = swap_workaround (w3_t[1]);
-    //w3_t[2] = swap_workaround (w3_t[2]);
-    //w3_t[3] = swap_workaround (w3_t[3]);
+    w0_t[0] = swap32 (w0_t[0]);
+    w0_t[1] = swap32 (w0_t[1]);
+    w0_t[2] = swap32 (w0_t[2]);
+    w0_t[3] = swap32 (w0_t[3]);
+    w1_t[0] = swap32 (w1_t[0]);
+    w1_t[1] = swap32 (w1_t[1]);
+    w1_t[2] = swap32 (w1_t[2]);
+    w1_t[3] = swap32 (w1_t[3]);
+    w2_t[0] = swap32 (w2_t[0]);
+    w2_t[1] = swap32 (w2_t[1]);
+    w2_t[2] = swap32 (w2_t[2]);
+    w2_t[3] = swap32 (w2_t[3]);
+    w3_t[0] = swap32 (w3_t[0]);
+    w3_t[1] = swap32 (w3_t[1]);
+    //w3_t[2] = swap32 (w3_t[2]);
+    //w3_t[3] = swap32 (w3_t[3]);
 
     u32 a = SHA1M_A;
     u32 b = SHA1M_B;