mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-23 15:18:16 +00:00
Optimize rule_op_mangle_dupechar_last()
This commit is contained in:
parent
03fde2cdc3
commit
bd12a1eb0d
@ -1799,17 +1799,16 @@ inline u32 rule_op_mangle_dupechar_last (const u32 p0, const u32 p1, u32 buf0[4]
|
|||||||
|
|
||||||
u32 tmp = 0;
|
u32 tmp = 0;
|
||||||
|
|
||||||
switch (in_len1 / 4)
|
tmp |= (in_len1 < 4) ? buf0[0] : 0;
|
||||||
{
|
tmp |= ((in_len1 >= 4) && (in_len1 < 8)) ? buf0[1] : 0;
|
||||||
case 0: tmp = (buf0[0] >> sh) & 0xff; break;
|
tmp |= ((in_len1 >= 8) && (in_len1 < 12)) ? buf0[2] : 0;
|
||||||
case 1: tmp = (buf0[1] >> sh) & 0xff; break;
|
tmp |= ((in_len1 >= 12) && (in_len1 < 16)) ? buf0[3] : 0;
|
||||||
case 2: tmp = (buf0[2] >> sh) & 0xff; break;
|
tmp |= ((in_len1 >= 16) && (in_len1 < 20)) ? buf1[0] : 0;
|
||||||
case 3: tmp = (buf0[3] >> sh) & 0xff; break;
|
tmp |= ((in_len1 >= 20) && (in_len1 < 24)) ? buf1[1] : 0;
|
||||||
case 4: tmp = (buf1[0] >> sh) & 0xff; break;
|
tmp |= ((in_len1 >= 24) && (in_len1 < 28)) ? buf1[2] : 0;
|
||||||
case 5: tmp = (buf1[1] >> sh) & 0xff; break;
|
tmp |= (in_len1 >= 28) ? buf1[3] : 0;
|
||||||
case 6: tmp = (buf1[2] >> sh) & 0xff; break;
|
|
||||||
case 7: tmp = (buf1[3] >> sh) & 0xff; break;
|
tmp = (tmp >> sh) & 0xff;
|
||||||
}
|
|
||||||
|
|
||||||
u32 out_len = in_len;
|
u32 out_len = in_len;
|
||||||
|
|
||||||
|
@ -1881,17 +1881,16 @@ static u32 rule_op_mangle_dupechar_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED
|
|||||||
|
|
||||||
u32 tmp = 0;
|
u32 tmp = 0;
|
||||||
|
|
||||||
switch (in_len1 / 4)
|
tmp |= (in_len1 < 4) ? buf0[0] : 0;
|
||||||
{
|
tmp |= ((in_len1 >= 4) && (in_len1 < 8)) ? buf0[1] : 0;
|
||||||
case 0: tmp = (buf0[0] >> sh) & 0xff; break;
|
tmp |= ((in_len1 >= 8) && (in_len1 < 12)) ? buf0[2] : 0;
|
||||||
case 1: tmp = (buf0[1] >> sh) & 0xff; break;
|
tmp |= ((in_len1 >= 12) && (in_len1 < 16)) ? buf0[3] : 0;
|
||||||
case 2: tmp = (buf0[2] >> sh) & 0xff; break;
|
tmp |= ((in_len1 >= 16) && (in_len1 < 20)) ? buf1[0] : 0;
|
||||||
case 3: tmp = (buf0[3] >> sh) & 0xff; break;
|
tmp |= ((in_len1 >= 20) && (in_len1 < 24)) ? buf1[1] : 0;
|
||||||
case 4: tmp = (buf1[0] >> sh) & 0xff; break;
|
tmp |= ((in_len1 >= 24) && (in_len1 < 28)) ? buf1[2] : 0;
|
||||||
case 5: tmp = (buf1[1] >> sh) & 0xff; break;
|
tmp |= (in_len1 >= 28) ? buf1[3] : 0;
|
||||||
case 6: tmp = (buf1[2] >> sh) & 0xff; break;
|
|
||||||
case 7: tmp = (buf1[3] >> sh) & 0xff; break;
|
tmp = (tmp >> sh) & 0xff;
|
||||||
}
|
|
||||||
|
|
||||||
u32 out_len = in_len;
|
u32 out_len = in_len;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user