From f5e04254dc75d437d04af7add69f8f6f012e7b3a Mon Sep 17 00:00:00 2001 From: jsteube Date: Fri, 1 Sep 2017 16:06:42 +0200 Subject: [PATCH] Fix -m 10800 in -a 0 mode --- OpenCL/m10800_a0.cl | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/OpenCL/m10800_a0.cl b/OpenCL/m10800_a0.cl index abe6efa67..6710d0628 100644 --- a/OpenCL/m10800_a0.cl +++ b/OpenCL/m10800_a0.cl @@ -30,14 +30,7 @@ __kernel void m10800_mxx (__global pw_t *pws, __constant const kernel_rule_t *ru * base */ - const u32 pw_len = pws[gid].pw_len; - - u32 w[64] = { 0 }; - - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) - { - w[idx] = swap32_S (pws[gid].i[idx]); - } + COPY_PW (pws[gid]); /** * loop @@ -53,7 +46,7 @@ __kernel void m10800_mxx (__global pw_t *pws, __constant const kernel_rule_t *ru sha384_init (&ctx); - sha384_update (&ctx, tmp.i, tmp.pw_len); + sha384_update_swap (&ctx, tmp.i, tmp.pw_len); sha384_final (&ctx); @@ -93,14 +86,7 @@ __kernel void m10800_sxx (__global pw_t *pws, __constant const kernel_rule_t *ru * base */ - const u32 pw_len = pws[gid].pw_len; - - u32 w[64] = { 0 }; - - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) - { - w[idx] = swap32_S (pws[gid].i[idx]); - } + COPY_PW (pws[gid]); /** * loop @@ -116,7 +102,7 @@ __kernel void m10800_sxx (__global pw_t *pws, __constant const kernel_rule_t *ru sha384_init (&ctx); - sha384_update (&ctx, tmp.i, tmp.pw_len); + sha384_update_swap (&ctx, tmp.i, tmp.pw_len); sha384_final (&ctx);