mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-22 16:18:09 +00:00
Simplify alignment masks for mode 18100
This commit is contained in:
parent
4724e1f589
commit
1d43540fc4
@ -70,13 +70,13 @@ __kernel void m18100_mxx (__global pw_t *pws, __constant const kernel_rule_t *ru
|
||||
switch(otp_offset&3)
|
||||
{
|
||||
case 1:
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x00ffffff) << 8) | ((ctx.opad.h[otp_offset/4+1] & 0xfffffeff) >> 24);
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x00ffffff) << 8) | ((ctx.opad.h[otp_offset/4+1] & 0xff000000) >> 24);
|
||||
break;
|
||||
case 2:
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x0000ffff) << 16) | ((ctx.opad.h[otp_offset/4+1] & 0xfffeffff) >> 16);
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x0000ffff) << 16) | ((ctx.opad.h[otp_offset/4+1] & 0xffff0000) >> 16);
|
||||
break;
|
||||
case 3:
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x000000ff) << 24) | ((ctx.opad.h[otp_offset/4+1] & 0xfffffeff) >> 8);
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x000000ff) << 24) | ((ctx.opad.h[otp_offset/4+1] & 0xffffff00) >> 8);
|
||||
break;
|
||||
default:
|
||||
otp_code = ctx.opad.h[otp_offset/4];
|
||||
@ -163,13 +163,13 @@ __kernel void m18100_sxx (__global pw_t *pws, __constant const kernel_rule_t *ru
|
||||
switch(otp_offset&3)
|
||||
{
|
||||
case 1:
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x00ffffff) << 8) | ((ctx.opad.h[otp_offset/4+1] & 0xfffffeff) >> 24);
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x00ffffff) << 8) | ((ctx.opad.h[otp_offset/4+1] & 0xff000000) >> 24);
|
||||
break;
|
||||
case 2:
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x0000ffff) << 16) | ((ctx.opad.h[otp_offset/4+1] & 0xfffeffff) >> 16);
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x0000ffff) << 16) | ((ctx.opad.h[otp_offset/4+1] & 0xffff0000) >> 16);
|
||||
break;
|
||||
case 3:
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x000000ff) << 24) | ((ctx.opad.h[otp_offset/4+1] & 0xfffffeff) >> 8);
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x000000ff) << 24) | ((ctx.opad.h[otp_offset/4+1] & 0xffffff00) >> 8);
|
||||
break;
|
||||
default:
|
||||
otp_code = ctx.opad.h[otp_offset/4];
|
||||
|
@ -79,13 +79,13 @@ __kernel void m18100_mxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
||||
switch(otp_offset&3)
|
||||
{
|
||||
case 1:
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x00ffffff) << 8) | ((ctx.opad.h[otp_offset/4+1] & 0xfffffeff) >> 24);
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x00ffffff) << 8) | ((ctx.opad.h[otp_offset/4+1] & 0xff000000) >> 24);
|
||||
break;
|
||||
case 2:
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x0000ffff) << 16) | ((ctx.opad.h[otp_offset/4+1] & 0xfffeffff) >> 16);
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x0000ffff) << 16) | ((ctx.opad.h[otp_offset/4+1] & 0xffff0000) >> 16);
|
||||
break;
|
||||
case 3:
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x000000ff) << 24) | ((ctx.opad.h[otp_offset/4+1] & 0xfeffffff) >> 8);
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x000000ff) << 24) | ((ctx.opad.h[otp_offset/4+1] & 0xffffff00) >> 8);
|
||||
break;
|
||||
default:
|
||||
otp_code = ctx.opad.h[otp_offset/4];
|
||||
@ -182,14 +182,14 @@ __kernel void m18100_sxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
||||
// on some systems, &3 is faster than %4, so we will use it in our switch()
|
||||
switch(otp_offset&3)
|
||||
{
|
||||
case 1:
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x00ffffff) << 8) | ((ctx.opad.h[otp_offset/4+1] & 0xfffffeff) >> 24);
|
||||
case 1:
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x00ffffff) << 8) | ((ctx.opad.h[otp_offset/4+1] & 0xff000000) >> 24);
|
||||
break;
|
||||
case 2:
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x0000ffff) << 16) | ((ctx.opad.h[otp_offset/4+1] & 0xfffeffff) >> 16);
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x0000ffff) << 16) | ((ctx.opad.h[otp_offset/4+1] & 0xffff0000) >> 16);
|
||||
break;
|
||||
case 3:
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x000000ff) << 24) | ((ctx.opad.h[otp_offset/4+1] & 0xfffffeff) >> 8);
|
||||
otp_code = ((ctx.opad.h[otp_offset/4] & 0x000000ff) << 24) | ((ctx.opad.h[otp_offset/4+1] & 0xffffff00) >> 8);
|
||||
break;
|
||||
default:
|
||||
otp_code = ctx.opad.h[otp_offset/4];
|
||||
|
Loading…
Reference in New Issue
Block a user