1
mirror of https://github.com/hashcat/hashcat synced 2024-11-13 17:28:58 +01:00

Remove some optimization in -m 18700 which ROCM doesn't like

This commit is contained in:
jsteube 2019-02-24 08:02:13 +01:00
parent 25540494d6
commit be365acef8
6 changed files with 108 additions and 24 deletions

View File

@ -28,10 +28,24 @@ DECLSPEC u32 hashCode (const u32 init, const u32 *w, const u32 pw_len)
switch (c)
{
case 4: hash *= 31; hash += tmp & 0xff; tmp >>= 8;
case 3: hash *= 31; hash += tmp & 0xff; tmp >>= 8;
case 2: hash *= 31; hash += tmp & 0xff; tmp >>= 8;
case 1: hash *= 31; hash += tmp & 0xff;
case 1:
hash *= 31; hash += (tmp >> 0) & 0xff;
break;
case 2:
hash *= 31; hash += (tmp >> 0) & 0xff;
hash *= 31; hash += (tmp >> 8) & 0xff;
break;
case 3:
hash *= 31; hash += (tmp >> 0) & 0xff;
hash *= 31; hash += (tmp >> 8) & 0xff;
hash *= 31; hash += (tmp >> 16) & 0xff;
break;
case 4:
hash *= 31; hash += (tmp >> 0) & 0xff;
hash *= 31; hash += (tmp >> 8) & 0xff;
hash *= 31; hash += (tmp >> 16) & 0xff;
hash *= 31; hash += (tmp >> 24) & 0xff;
break;
}
}

View File

@ -29,10 +29,24 @@ DECLSPEC u32 hashCode (const u32 init, const u32 *w, const u32 pw_len)
switch (c)
{
case 4: hash *= 31; hash += tmp & 0xff; tmp >>= 8;
case 3: hash *= 31; hash += tmp & 0xff; tmp >>= 8;
case 2: hash *= 31; hash += tmp & 0xff; tmp >>= 8;
case 1: hash *= 31; hash += tmp & 0xff;
case 1:
hash *= 31; hash += (tmp >> 0) & 0xff;
break;
case 2:
hash *= 31; hash += (tmp >> 0) & 0xff;
hash *= 31; hash += (tmp >> 8) & 0xff;
break;
case 3:
hash *= 31; hash += (tmp >> 0) & 0xff;
hash *= 31; hash += (tmp >> 8) & 0xff;
hash *= 31; hash += (tmp >> 16) & 0xff;
break;
case 4:
hash *= 31; hash += (tmp >> 0) & 0xff;
hash *= 31; hash += (tmp >> 8) & 0xff;
hash *= 31; hash += (tmp >> 16) & 0xff;
hash *= 31; hash += (tmp >> 24) & 0xff;
break;
}
}

View File

@ -28,10 +28,24 @@ DECLSPEC u32 hashCode_g (const u32 init, __global u32 * restrict w, const u32 pw
switch (c)
{
case 4: hash *= 31; hash += tmp & 0xff; tmp >>= 8;
case 3: hash *= 31; hash += tmp & 0xff; tmp >>= 8;
case 2: hash *= 31; hash += tmp & 0xff; tmp >>= 8;
case 1: hash *= 31; hash += tmp & 0xff;
case 1:
hash *= 31; hash += (tmp >> 0) & 0xff;
break;
case 2:
hash *= 31; hash += (tmp >> 0) & 0xff;
hash *= 31; hash += (tmp >> 8) & 0xff;
break;
case 3:
hash *= 31; hash += (tmp >> 0) & 0xff;
hash *= 31; hash += (tmp >> 8) & 0xff;
hash *= 31; hash += (tmp >> 16) & 0xff;
break;
case 4:
hash *= 31; hash += (tmp >> 0) & 0xff;
hash *= 31; hash += (tmp >> 8) & 0xff;
hash *= 31; hash += (tmp >> 16) & 0xff;
hash *= 31; hash += (tmp >> 24) & 0xff;
break;
}
}

View File

@ -27,10 +27,24 @@ DECLSPEC u32 hashCode_g (const u32 init, __global u32 * restrict w, const u32 pw
switch (c)
{
case 4: hash *= 31; hash += tmp & 0xff; tmp >>= 8;
case 3: hash *= 31; hash += tmp & 0xff; tmp >>= 8;
case 2: hash *= 31; hash += tmp & 0xff; tmp >>= 8;
case 1: hash *= 31; hash += tmp & 0xff;
case 1:
hash *= 31; hash += (tmp >> 0) & 0xff;
break;
case 2:
hash *= 31; hash += (tmp >> 0) & 0xff;
hash *= 31; hash += (tmp >> 8) & 0xff;
break;
case 3:
hash *= 31; hash += (tmp >> 0) & 0xff;
hash *= 31; hash += (tmp >> 8) & 0xff;
hash *= 31; hash += (tmp >> 16) & 0xff;
break;
case 4:
hash *= 31; hash += (tmp >> 0) & 0xff;
hash *= 31; hash += (tmp >> 8) & 0xff;
hash *= 31; hash += (tmp >> 16) & 0xff;
hash *= 31; hash += (tmp >> 24) & 0xff;
break;
}
}

View File

@ -45,10 +45,24 @@ DECLSPEC u32x hashCode_w0 (const u32x init, const u32x w0, const u32 *w, const u
switch (c)
{
case 4: hash *= 31; hash += tmp & 0xff; tmp >>= 8;
case 3: hash *= 31; hash += tmp & 0xff; tmp >>= 8;
case 2: hash *= 31; hash += tmp & 0xff; tmp >>= 8;
case 1: hash *= 31; hash += tmp & 0xff;
case 1:
hash *= 31; hash += (tmp >> 0) & 0xff;
break;
case 2:
hash *= 31; hash += (tmp >> 0) & 0xff;
hash *= 31; hash += (tmp >> 8) & 0xff;
break;
case 3:
hash *= 31; hash += (tmp >> 0) & 0xff;
hash *= 31; hash += (tmp >> 8) & 0xff;
hash *= 31; hash += (tmp >> 16) & 0xff;
break;
case 4:
hash *= 31; hash += (tmp >> 0) & 0xff;
hash *= 31; hash += (tmp >> 8) & 0xff;
hash *= 31; hash += (tmp >> 16) & 0xff;
hash *= 31; hash += (tmp >> 24) & 0xff;
break;
}
}

View File

@ -45,10 +45,24 @@ DECLSPEC u32x hashCode_w0 (const u32x init, const u32x w0, const u32 *w, const u
switch (c)
{
case 4: hash *= 31; hash += tmp & 0xff; tmp >>= 8;
case 3: hash *= 31; hash += tmp & 0xff; tmp >>= 8;
case 2: hash *= 31; hash += tmp & 0xff; tmp >>= 8;
case 1: hash *= 31; hash += tmp & 0xff;
case 1:
hash *= 31; hash += (tmp >> 0) & 0xff;
break;
case 2:
hash *= 31; hash += (tmp >> 0) & 0xff;
hash *= 31; hash += (tmp >> 8) & 0xff;
break;
case 3:
hash *= 31; hash += (tmp >> 0) & 0xff;
hash *= 31; hash += (tmp >> 8) & 0xff;
hash *= 31; hash += (tmp >> 16) & 0xff;
break;
case 4:
hash *= 31; hash += (tmp >> 0) & 0xff;
hash *= 31; hash += (tmp >> 8) & 0xff;
hash *= 31; hash += (tmp >> 16) & 0xff;
hash *= 31; hash += (tmp >> 24) & 0xff;
break;
}
}