Fix more append_* functions in kernels
[hashcat.git] / OpenCL / m08800.cl
index 6ff2525..e3568ef 100644 (file)
@@ -1498,22 +1498,22 @@ __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m08800_init (__gl
    * pads
    */
 
-  w0[0] = swap_workaround (w0[0]);
-  w0[1] = swap_workaround (w0[1]);
-  w0[2] = swap_workaround (w0[2]);
-  w0[3] = swap_workaround (w0[3]);
-  w1[0] = swap_workaround (w1[0]);
-  w1[1] = swap_workaround (w1[1]);
-  w1[2] = swap_workaround (w1[2]);
-  w1[3] = swap_workaround (w1[3]);
-  w2[0] = swap_workaround (w2[0]);
-  w2[1] = swap_workaround (w2[1]);
-  w2[2] = swap_workaround (w2[2]);
-  w2[3] = swap_workaround (w2[3]);
-  w3[0] = swap_workaround (w3[0]);
-  w3[1] = swap_workaround (w3[1]);
-  w3[2] = swap_workaround (w3[2]);
-  w3[3] = swap_workaround (w3[3]);
+  w0[0] = swap32 (w0[0]);
+  w0[1] = swap32 (w0[1]);
+  w0[2] = swap32 (w0[2]);
+  w0[3] = swap32 (w0[3]);
+  w1[0] = swap32 (w1[0]);
+  w1[1] = swap32 (w1[1]);
+  w1[2] = swap32 (w1[2]);
+  w1[3] = swap32 (w1[3]);
+  w2[0] = swap32 (w2[0]);
+  w2[1] = swap32 (w2[1]);
+  w2[2] = swap32 (w2[2]);
+  w2[3] = swap32 (w2[3]);
+  w3[0] = swap32 (w3[0]);
+  w3[1] = swap32 (w3[1]);
+  w3[2] = swap32 (w3[2]);
+  w3[3] = swap32 (w3[3]);
 
   u32 ipad[5];
   u32 opad[5];
@@ -1558,16 +1558,16 @@ __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m08800_init (__gl
 
     append_0x80_3x4 (w0, w1, w2, salt_len + 4);
 
-    w0[0] = swap_workaround (w0[0]);
-    w0[1] = swap_workaround (w0[1]);
-    w0[2] = swap_workaround (w0[2]);
-    w0[3] = swap_workaround (w0[3]);
-    w1[0] = swap_workaround (w1[0]);
-    w1[1] = swap_workaround (w1[1]);
-    w1[2] = swap_workaround (w1[2]);
-    w1[3] = swap_workaround (w1[3]);
-    w2[0] = swap_workaround (w2[0]);
-    w2[1] = swap_workaround (w2[1]);
+    w0[0] = swap32 (w0[0]);
+    w0[1] = swap32 (w0[1]);
+    w0[2] = swap32 (w0[2]);
+    w0[3] = swap32 (w0[3]);
+    w1[0] = swap32 (w1[0]);
+    w1[1] = swap32 (w1[1]);
+    w1[2] = swap32 (w1[2]);
+    w1[3] = swap32 (w1[3]);
+    w2[0] = swap32 (w2[0]);
+    w2[1] = swap32 (w2[1]);
     w2[2] = 0;
     w2[3] = 0;
     w3[0] = 0;
@@ -1979,9 +1979,9 @@ __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m08800_comp (__gl
     }
 
     // we need just a few swapped, because we do not access the others
-    r[ 5] = swap_workaround (r[ 5]);
-    r[ 6] = swap_workaround (r[ 6]);
-    r[14] = swap_workaround (r[14]);
+    r[ 5] = swap32 (r[ 5]);
+    r[ 6] = swap32 (r[ 6]);
+    r[14] = swap32 (r[14]);
 
     // superblock not on id 0 or 1
     // assumes max block size is 32MiB