mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-15 12:29:35 +00:00
Merge branch 'master' into unit_tests_update
This commit is contained in:
commit
7df672683a
@ -1046,7 +1046,7 @@ DECLSPEC void exchange_byte_optimized (u32 *buf, const int off_src, const int of
|
||||
ptr[off_dst] = tmp;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_lrest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_lrest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
u32 t;
|
||||
|
||||
@ -1062,7 +1062,7 @@ DECLSPEC u32 rule_op_mangle_lrest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const
|
||||
return in_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_urest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_urest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
u32 t;
|
||||
|
||||
@ -1078,7 +1078,7 @@ DECLSPEC u32 rule_op_mangle_urest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const
|
||||
return in_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_lrest_ufirst (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_lrest_ufirst (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
u32 t;
|
||||
|
||||
@ -1096,7 +1096,7 @@ DECLSPEC u32 rule_op_mangle_lrest_ufirst (MAYBE_UNUSED const u32 p0, MAYBE_UNUSE
|
||||
return in_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_urest_lfirst (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_urest_lfirst (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
u32 t;
|
||||
|
||||
@ -1114,7 +1114,7 @@ DECLSPEC u32 rule_op_mangle_urest_lfirst (MAYBE_UNUSED const u32 p0, MAYBE_UNUSE
|
||||
return in_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_trest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_trest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
u32 t;
|
||||
|
||||
@ -1130,7 +1130,7 @@ DECLSPEC u32 rule_op_mangle_trest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const
|
||||
return in_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_toggle_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_toggle_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (p0 >= in_len) return in_len;
|
||||
|
||||
@ -1163,7 +1163,7 @@ DECLSPEC u32 rule_op_mangle_toggle_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED c
|
||||
return (in_len);
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_toggle_at_sep (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_toggle_at_sep (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (in_len == 0) return in_len;
|
||||
|
||||
@ -1239,14 +1239,14 @@ DECLSPEC u32 rule_op_mangle_toggle_at_sep (MAYBE_UNUSED const u32 p0, MAYBE_UNUS
|
||||
return in_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_reverse (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_reverse (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
reverse_block_optimized (buf0, buf1, buf0, buf1, in_len);
|
||||
|
||||
return in_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_dupeword (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_dupeword (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if ((in_len + in_len) >= 32) return in_len;
|
||||
|
||||
@ -1259,7 +1259,7 @@ DECLSPEC u32 rule_op_mangle_dupeword (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED co
|
||||
return out_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_dupeword_times (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_dupeword_times (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (((in_len * p0) + in_len) >= 32) return in_len;
|
||||
|
||||
@ -1287,7 +1287,7 @@ DECLSPEC u32 rule_op_mangle_dupeword_times (MAYBE_UNUSED const u32 p0, MAYBE_UNU
|
||||
return out_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_reflect (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_reflect (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if ((in_len + in_len) >= 32) return in_len;
|
||||
|
||||
@ -1305,7 +1305,7 @@ DECLSPEC u32 rule_op_mangle_reflect (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED con
|
||||
return out_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_append (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_append (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if ((in_len + 1) >= 32) return in_len;
|
||||
|
||||
@ -1318,7 +1318,7 @@ DECLSPEC u32 rule_op_mangle_append (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED cons
|
||||
return out_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_prepend (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_prepend (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if ((in_len + 1) >= 32) return in_len;
|
||||
|
||||
@ -1333,7 +1333,7 @@ DECLSPEC u32 rule_op_mangle_prepend (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED con
|
||||
return out_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_rotate_left (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_rotate_left (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (in_len == 0) return in_len;
|
||||
|
||||
@ -1348,7 +1348,7 @@ DECLSPEC u32 rule_op_mangle_rotate_left (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED
|
||||
return in_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_rotate_right (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_rotate_right (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (in_len == 0) return in_len;
|
||||
|
||||
@ -1390,7 +1390,7 @@ DECLSPEC u32 rule_op_mangle_rotate_right (MAYBE_UNUSED const u32 p0, MAYBE_UNUSE
|
||||
return in_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_delete_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_delete_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (in_len == 0) return in_len;
|
||||
|
||||
@ -1401,7 +1401,7 @@ DECLSPEC u32 rule_op_mangle_delete_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSE
|
||||
return in_len1;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_delete_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_delete_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (in_len == 0) return in_len;
|
||||
|
||||
@ -1421,7 +1421,7 @@ DECLSPEC u32 rule_op_mangle_delete_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED
|
||||
return in_len1;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_delete_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_delete_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (p0 >= in_len) return in_len;
|
||||
|
||||
@ -1498,7 +1498,7 @@ DECLSPEC u32 rule_op_mangle_delete_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED c
|
||||
return out_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_extract (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_extract (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (p0 >= in_len) return in_len;
|
||||
|
||||
@ -1513,7 +1513,7 @@ DECLSPEC u32 rule_op_mangle_extract (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED con
|
||||
return out_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_omit (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_omit (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (p0 >= in_len) return in_len;
|
||||
|
||||
@ -1601,7 +1601,7 @@ DECLSPEC u32 rule_op_mangle_omit (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const
|
||||
return out_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_insert (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_insert (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (p0 > in_len) return in_len;
|
||||
|
||||
@ -1675,7 +1675,7 @@ DECLSPEC u32 rule_op_mangle_insert (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED cons
|
||||
return out_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_overstrike (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_overstrike (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (p0 >= in_len) return in_len;
|
||||
|
||||
@ -1710,7 +1710,7 @@ DECLSPEC u32 rule_op_mangle_overstrike (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED
|
||||
return in_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_truncate_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_truncate_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (p0 >= in_len) return in_len;
|
||||
|
||||
@ -1743,7 +1743,7 @@ DECLSPEC u32 replace_on_register (const u32 in, const u32 r, const u32 p1)
|
||||
return out;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_replace (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_replace (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
const u32 r0 = search_on_register (buf0[0], p0);
|
||||
const u32 r1 = search_on_register (buf0[1], p0);
|
||||
@ -1770,7 +1770,7 @@ DECLSPEC u32 rule_op_mangle_replace (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED con
|
||||
return in_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_purgechar (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_purgechar (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
const u32 r0 = search_on_register (buf0[0], p0);
|
||||
const u32 r1 = search_on_register (buf0[1], p0);
|
||||
@ -1824,7 +1824,7 @@ DECLSPEC u32 rule_op_mangle_purgechar (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED c
|
||||
return out_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_dupechar_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_dupechar_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if ( in_len == 0) return in_len;
|
||||
if ((in_len + p0) >= 32) return in_len;
|
||||
@ -1859,7 +1859,7 @@ DECLSPEC u32 rule_op_mangle_dupechar_first (MAYBE_UNUSED const u32 p0, MAYBE_UNU
|
||||
return out_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_dupechar_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_dupechar_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if ( in_len == 0) return in_len;
|
||||
if ((in_len + p0) >= 32) return in_len;
|
||||
@ -1905,7 +1905,7 @@ DECLSPEC u32 rule_op_mangle_dupechar_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUS
|
||||
return out_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_dupechar_all (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_dupechar_all (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if ( in_len == 0) return in_len;
|
||||
if ((in_len + in_len) >= 32) return in_len;
|
||||
@ -1938,7 +1938,7 @@ DECLSPEC u32 rule_op_mangle_dupechar_all (MAYBE_UNUSED const u32 p0, MAYBE_UNUSE
|
||||
return out_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_switch_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_switch_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (in_len < 2) return in_len;
|
||||
|
||||
@ -1947,7 +1947,7 @@ DECLSPEC u32 rule_op_mangle_switch_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSE
|
||||
return in_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_switch_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_switch_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (in_len < 2) return in_len;
|
||||
|
||||
@ -1976,7 +1976,7 @@ DECLSPEC u32 rule_op_mangle_switch_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED
|
||||
return in_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_switch_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_switch_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (p0 >= in_len) return in_len;
|
||||
if (p1 >= in_len) return in_len;
|
||||
@ -2006,7 +2006,7 @@ DECLSPEC u32 rule_op_mangle_switch_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED c
|
||||
return in_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_chr_shiftl (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_chr_shiftl (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (p0 >= in_len) return in_len;
|
||||
|
||||
@ -2040,7 +2040,7 @@ DECLSPEC u32 rule_op_mangle_chr_shiftl (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED
|
||||
return in_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_chr_shiftr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_chr_shiftr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (p0 >= in_len) return in_len;
|
||||
|
||||
@ -2074,7 +2074,7 @@ DECLSPEC u32 rule_op_mangle_chr_shiftr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED
|
||||
return in_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_chr_incr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_chr_incr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (p0 >= in_len) return in_len;
|
||||
|
||||
@ -2110,7 +2110,7 @@ DECLSPEC u32 rule_op_mangle_chr_incr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED co
|
||||
return in_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_chr_decr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_chr_decr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (p0 >= in_len) return in_len;
|
||||
|
||||
@ -2146,7 +2146,7 @@ DECLSPEC u32 rule_op_mangle_chr_decr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED co
|
||||
return in_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_replace_np1 (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_replace_np1 (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if ((p0 + 1) >= in_len) return in_len;
|
||||
|
||||
@ -2186,7 +2186,7 @@ DECLSPEC u32 rule_op_mangle_replace_np1 (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED
|
||||
return in_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_replace_nm1 (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_replace_nm1 (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (p0 == 0) return in_len;
|
||||
|
||||
@ -2228,7 +2228,7 @@ DECLSPEC u32 rule_op_mangle_replace_nm1 (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED
|
||||
return in_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_dupeblock_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_dupeblock_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (p0 > in_len) return in_len;
|
||||
|
||||
@ -2266,7 +2266,7 @@ DECLSPEC u32 rule_op_mangle_dupeblock_first (MAYBE_UNUSED const u32 p0, MAYBE_UN
|
||||
return out_len;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_dupeblock_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_dupeblock_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (p0 > in_len) return in_len;
|
||||
|
||||
@ -2309,7 +2309,7 @@ DECLSPEC u32 toggle_on_register (const u32 in, const u32 r)
|
||||
return out;
|
||||
}
|
||||
|
||||
DECLSPEC u32 rule_op_mangle_title_sep (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_title_sep (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len)
|
||||
{
|
||||
if (in_len == 0) return in_len;
|
||||
|
||||
|
@ -14,6 +14,12 @@
|
||||
#define MAYBE_UNUSED
|
||||
#endif
|
||||
|
||||
#ifdef IS_APPLE_SILICON
|
||||
#define HC_INLINE __attribute__ ((noinline))
|
||||
#else
|
||||
#define HC_INLINE
|
||||
#endif
|
||||
|
||||
#define RULE_OP_MANGLE_NOOP ':'
|
||||
#define RULE_OP_MANGLE_LREST 'l'
|
||||
#define RULE_OP_MANGLE_UREST 'u'
|
||||
@ -80,49 +86,49 @@ DECLSPEC void append_block1_optimized (const u32 offset, u32 *buf0, u32 *buf1, c
|
||||
DECLSPEC void append_block8_optimized (const u32 offset, u32 *buf0, u32 *buf1, const u32 *src_l0, const u32 *src_l1, const u32 *src_r0, const u32 *src_r1);
|
||||
DECLSPEC void reverse_block_optimized (u32 *in0, u32 *in1, u32 *out0, u32 *out1, const u32 len);
|
||||
DECLSPEC void exchange_byte_optimized (u32 *buf, const int off_src, const int off_dst);
|
||||
DECLSPEC u32 rule_op_mangle_lrest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_urest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_lrest_ufirst (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_urest_lfirst (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_trest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_toggle_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_toggle_at_sep (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_reverse (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_dupeword (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_dupeword_times (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_reflect (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_append (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_prepend (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_rotate_left (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_rotate_right (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_delete_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_delete_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_delete_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_extract (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_omit (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_insert (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_overstrike (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_truncate_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_lrest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_urest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_lrest_ufirst (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_urest_lfirst (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_trest (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_toggle_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_toggle_at_sep (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_reverse (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_dupeword (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_dupeword_times (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_reflect (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_append (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_prepend (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_rotate_left (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_rotate_right (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_delete_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_delete_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_delete_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_extract (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_omit (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_insert (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_overstrike (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_truncate_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 search_on_register (const u32 in, const u32 p0);
|
||||
DECLSPEC u32 replace_on_register (const u32 in, const u32 r, const u32 p1);
|
||||
DECLSPEC u32 rule_op_mangle_replace (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_purgechar (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_dupechar_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_dupechar_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_dupechar_all (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_switch_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_switch_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_switch_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_chr_shiftl (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_chr_shiftr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_chr_incr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_chr_decr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_replace_np1 (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_replace_nm1 (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_dupeblock_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 rule_op_mangle_dupeblock_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_replace (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_purgechar (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_dupechar_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_dupechar_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_dupechar_all (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_switch_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_switch_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_switch_at (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_chr_shiftl (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_chr_shiftr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_chr_incr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_chr_decr (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_replace_np1 (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_replace_nm1 (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_dupeblock_first (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_dupeblock_last (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 toggle_on_register (const u32 in, const u32 r);
|
||||
DECLSPEC u32 rule_op_mangle_title_sep (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC HC_INLINE u32 rule_op_mangle_title_sep (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 apply_rule_optimized (const u32 name, const u32 p0, const u32 p1, u32 *buf0, u32 *buf1, const u32 in_len);
|
||||
DECLSPEC u32 apply_rules_optimized (CONSTANT_AS const u32 *cmds, u32 *buf0, u32 *buf1, const u32 len);
|
||||
DECLSPEC u32x apply_rules_vect_optimized (const u32 *pw_buf0, const u32 *pw_buf1, const u32 pw_len, CONSTANT_AS const kernel_rule_t *kernel_rules, const u32 il_pos, u32x *buf0, u32x *buf1);
|
||||
|
@ -130,8 +130,8 @@
|
||||
#define DECLSPEC
|
||||
#endif
|
||||
|
||||
#define INLINE0 __attribute__ ((noinline))
|
||||
#define INLINE1 __attribute__ ((inline))
|
||||
#define HC_INLINE0 __attribute__ ((noinline))
|
||||
#define HC_INLINE1 __attribute__ ((inline))
|
||||
|
||||
/**
|
||||
* AMD specific
|
||||
|
@ -18,11 +18,11 @@
|
||||
#define COMPARE_M "inc_comp_multi.cl"
|
||||
|
||||
#if defined IS_AMD && defined IS_GPU
|
||||
#define INLINE
|
||||
#define HC_INLINE
|
||||
#elif defined IS_HIP
|
||||
#define INLINE INLINE0
|
||||
#define HC_INLINE HC_INLINE0
|
||||
#else
|
||||
#define INLINE
|
||||
#define HC_INLINE
|
||||
#endif
|
||||
|
||||
typedef struct pdf
|
||||
@ -323,7 +323,7 @@ DECLSPEC void make_w_with_offset (ctx_t *ctx, const u32 W_len, const u32 offset,
|
||||
}
|
||||
}
|
||||
|
||||
DECLSPEC INLINE u32 do_round (LOCAL_AS u32 *sc, const u32 *pw, const u32 pw_len, ctx_t *ctx, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4)
|
||||
DECLSPEC HC_INLINE u32 do_round (LOCAL_AS u32 *sc, const u32 *pw, const u32 pw_len, ctx_t *ctx, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4)
|
||||
{
|
||||
// make scratch buffer
|
||||
|
||||
|
345
OpenCL/m28300_a0-pure.cl
Normal file
345
OpenCL/m28300_a0-pure.cl
Normal file
@ -0,0 +1,345 @@
|
||||
/**
|
||||
* Author......: See docs/credits.txt
|
||||
* License.....: MIT
|
||||
*/
|
||||
|
||||
//#define NEW_SIMD_CODE
|
||||
|
||||
#ifdef KERNEL_STATIC
|
||||
#include "inc_vendor.h"
|
||||
#include "inc_types.h"
|
||||
#include "inc_platform.cl"
|
||||
#include "inc_common.cl"
|
||||
#include "inc_rp.h"
|
||||
#include "inc_rp.cl"
|
||||
#include "inc_scalar.cl"
|
||||
#include "inc_hash_sha1.cl"
|
||||
#endif
|
||||
|
||||
CONSTANT_VK u32 bin2base64[0x40] =
|
||||
{
|
||||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50,
|
||||
0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66,
|
||||
0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76,
|
||||
0x77, 0x78, 0x79, 0x7a, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x2b, 0x2f,
|
||||
};
|
||||
|
||||
#if VECT_SIZE == 1
|
||||
#define int_to_base64(c) make_u32x (s_bin2base64[(c)])
|
||||
#elif VECT_SIZE == 2
|
||||
#define int_to_base64(c) make_u32x (s_bin2base64[(c).s0], s_bin2base64[(c).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define int_to_base64(c) make_u32x (s_bin2base64[(c).s0], s_bin2base64[(c).s1], s_bin2base64[(c).s2], s_bin2base64[(c).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define int_to_base64(c) make_u32x (s_bin2base64[(c).s0], s_bin2base64[(c).s1], s_bin2base64[(c).s2], s_bin2base64[(c).s3], s_bin2base64[(c).s4], s_bin2base64[(c).s5], s_bin2base64[(c).s6], s_bin2base64[(c).s7])
|
||||
#elif VECT_SIZE == 16
|
||||
#define int_to_base64(c) make_u32x (s_bin2base64[(c).s0], s_bin2base64[(c).s1], s_bin2base64[(c).s2], s_bin2base64[(c).s3], s_bin2base64[(c).s4], s_bin2base64[(c).s5], s_bin2base64[(c).s6], s_bin2base64[(c).s7], s_bin2base64[(c).s8], s_bin2base64[(c).s9], s_bin2base64[(c).sa], s_bin2base64[(c).sb], s_bin2base64[(c).sc], s_bin2base64[(c).sd], s_bin2base64[(c).se], s_bin2base64[(c).sf])
|
||||
#endif
|
||||
|
||||
KERNEL_FQ void m28300_mxx (KERN_ATTR_RULES ())
|
||||
{
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u64 gid = get_global_id (0);
|
||||
const u64 lid = get_local_id (0);
|
||||
const u64 lsz = get_local_size (0);
|
||||
|
||||
/**
|
||||
* sbox
|
||||
*/
|
||||
|
||||
#ifdef REAL_SHM
|
||||
|
||||
LOCAL_VK u32 s_bin2base64[0x40];
|
||||
|
||||
for (u32 i = lid; i < 0x40; i += lsz)
|
||||
{
|
||||
s_bin2base64[i] = bin2base64[i];
|
||||
}
|
||||
|
||||
SYNC_THREADS ();
|
||||
|
||||
#else
|
||||
|
||||
CONSTANT_AS u32a *s_bin2base64 = bin2base64;
|
||||
|
||||
#endif
|
||||
|
||||
if (gid >= gid_max) return;
|
||||
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u32 salt_len = salt_bufs[SALT_POS].salt_len;
|
||||
|
||||
u32 s[64] = { 0 };
|
||||
|
||||
for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1)
|
||||
{
|
||||
s[idx] = salt_bufs[SALT_POS].salt_buf[idx];
|
||||
}
|
||||
|
||||
COPY_PW (pws[gid]);
|
||||
|
||||
/**
|
||||
* loop
|
||||
*/
|
||||
|
||||
for (u32 il_pos = 0; il_pos < il_cnt; il_pos++)
|
||||
{
|
||||
pw_t tmp = PASTE_PW;
|
||||
|
||||
tmp.pw_len = apply_rules (rules_buf[il_pos].cmds, tmp.i, tmp.pw_len);
|
||||
|
||||
sha1_ctx_t ctx;
|
||||
|
||||
sha1_init (&ctx);
|
||||
|
||||
sha1_update_swap (&ctx, tmp.i, tmp.pw_len);
|
||||
|
||||
sha1_final (&ctx);
|
||||
|
||||
u32 h[5];
|
||||
|
||||
h[0] = ctx.h[0];
|
||||
h[1] = ctx.h[1];
|
||||
h[2] = ctx.h[2];
|
||||
h[3] = ctx.h[3];
|
||||
h[4] = ctx.h[4];
|
||||
|
||||
#define tmp_u8_00 ((h[0] >> 26) & 0x3f)
|
||||
#define tmp_u8_01 ((h[0] >> 20) & 0x3f)
|
||||
#define tmp_u8_02 ((h[0] >> 14) & 0x3f)
|
||||
#define tmp_u8_03 ((h[0] >> 8) & 0x3f)
|
||||
#define tmp_u8_04 ((h[0] >> 2) & 0x3f)
|
||||
#define tmp_u8_05 ((h[0] << 4) & 0x3c) | ((h[1] >> 28) & 0x0f)
|
||||
#define tmp_u8_06 ((h[1] >> 22) & 0x3f)
|
||||
#define tmp_u8_07 ((h[1] >> 16) & 0x3f)
|
||||
#define tmp_u8_08 ((h[1] >> 10) & 0x3f)
|
||||
#define tmp_u8_09 ((h[1] >> 4) & 0x3f)
|
||||
#define tmp_u8_10 ((h[1] << 2) & 0x3c) | ((h[2] >> 30) & 0x03)
|
||||
#define tmp_u8_11 ((h[2] >> 24) & 0x3f)
|
||||
#define tmp_u8_12 ((h[2] >> 18) & 0x3f)
|
||||
#define tmp_u8_13 ((h[2] >> 12) & 0x3f)
|
||||
#define tmp_u8_14 ((h[2] >> 6) & 0x3f)
|
||||
#define tmp_u8_15 ((h[2] >> 0) & 0x3f)
|
||||
#define tmp_u8_16 ((h[3] >> 26) & 0x3f)
|
||||
#define tmp_u8_17 ((h[3] >> 20) & 0x3f)
|
||||
#define tmp_u8_18 ((h[3] >> 14) & 0x3f)
|
||||
#define tmp_u8_19 ((h[3] >> 8) & 0x3f)
|
||||
#define tmp_u8_20 ((h[3] >> 2) & 0x3f)
|
||||
#define tmp_u8_21 ((h[3] << 4) & 0x3c) | ((h[4] >> 28) & 0x0f)
|
||||
#define tmp_u8_22 ((h[4] >> 22) & 0x3f)
|
||||
#define tmp_u8_23 ((h[4] >> 16) & 0x3f)
|
||||
#define tmp_u8_24 ((h[4] >> 10) & 0x3f)
|
||||
#define tmp_u8_25 ((h[4] >> 4) & 0x3f)
|
||||
#define tmp_u8_26 ((h[4] << 2) & 0x3c)
|
||||
|
||||
sha1_init (&ctx);
|
||||
|
||||
ctx.w0[0] = int_to_base64 (tmp_u8_00) << 24
|
||||
| int_to_base64 (tmp_u8_01) << 16
|
||||
| int_to_base64 (tmp_u8_02) << 8
|
||||
| int_to_base64 (tmp_u8_03) << 0;
|
||||
ctx.w0[1] = int_to_base64 (tmp_u8_04) << 24
|
||||
| int_to_base64 (tmp_u8_05) << 16
|
||||
| int_to_base64 (tmp_u8_06) << 8
|
||||
| int_to_base64 (tmp_u8_07) << 0;
|
||||
ctx.w0[2] = int_to_base64 (tmp_u8_08) << 24
|
||||
| int_to_base64 (tmp_u8_09) << 16
|
||||
| int_to_base64 (tmp_u8_10) << 8
|
||||
| int_to_base64 (tmp_u8_11) << 0;
|
||||
ctx.w0[3] = int_to_base64 (tmp_u8_12) << 24
|
||||
| int_to_base64 (tmp_u8_13) << 16
|
||||
| int_to_base64 (tmp_u8_14) << 8
|
||||
| int_to_base64 (tmp_u8_15) << 0;
|
||||
ctx.w1[0] = int_to_base64 (tmp_u8_16) << 24
|
||||
| int_to_base64 (tmp_u8_17) << 16
|
||||
| int_to_base64 (tmp_u8_18) << 8
|
||||
| int_to_base64 (tmp_u8_19) << 0;
|
||||
ctx.w1[1] = int_to_base64 (tmp_u8_20) << 24
|
||||
| int_to_base64 (tmp_u8_21) << 16
|
||||
| int_to_base64 (tmp_u8_22) << 8
|
||||
| int_to_base64 (tmp_u8_23) << 0;
|
||||
ctx.w1[2] = int_to_base64 (tmp_u8_24) << 24
|
||||
| int_to_base64 (tmp_u8_25) << 16
|
||||
| int_to_base64 (tmp_u8_26) << 8
|
||||
| '=' << 0;
|
||||
|
||||
ctx.len = 28;
|
||||
|
||||
sha1_update (&ctx, s, 152);
|
||||
|
||||
sha1_final (&ctx);
|
||||
|
||||
const u32 r0 = ctx.h[DGST_R0];
|
||||
const u32 r1 = ctx.h[DGST_R1];
|
||||
const u32 r2 = ctx.h[DGST_R2];
|
||||
const u32 r3 = ctx.h[DGST_R3];
|
||||
|
||||
COMPARE_M_SCALAR (r0, r1, r2, r3);
|
||||
}
|
||||
}
|
||||
|
||||
KERNEL_FQ void m28300_sxx (KERN_ATTR_RULES ())
|
||||
{
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u64 gid = get_global_id (0);
|
||||
const u64 lid = get_local_id (0);
|
||||
const u64 lsz = get_local_size (0);
|
||||
|
||||
/**
|
||||
* sbox
|
||||
*/
|
||||
|
||||
#ifdef REAL_SHM
|
||||
|
||||
LOCAL_VK u32 s_bin2base64[0x40];
|
||||
|
||||
for (u32 i = lid; i < 0x40; i += lsz)
|
||||
{
|
||||
s_bin2base64[i] = bin2base64[i];
|
||||
}
|
||||
|
||||
SYNC_THREADS ();
|
||||
|
||||
#else
|
||||
|
||||
CONSTANT_AS u32a *s_bin2base64 = bin2base64;
|
||||
|
||||
#endif
|
||||
|
||||
if (gid >= gid_max) return;
|
||||
|
||||
/**
|
||||
* digest
|
||||
*/
|
||||
|
||||
const u32 search[4] =
|
||||
{
|
||||
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0],
|
||||
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1],
|
||||
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2],
|
||||
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3]
|
||||
};
|
||||
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u32 salt_len = salt_bufs[SALT_POS].salt_len;
|
||||
|
||||
u32 s[64] = { 0 };
|
||||
|
||||
for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1)
|
||||
{
|
||||
s[idx] = salt_bufs[SALT_POS].salt_buf[idx];
|
||||
}
|
||||
|
||||
COPY_PW (pws[gid]);
|
||||
|
||||
/**
|
||||
* loop
|
||||
*/
|
||||
|
||||
for (u32 il_pos = 0; il_pos < il_cnt; il_pos++)
|
||||
{
|
||||
pw_t tmp = PASTE_PW;
|
||||
|
||||
tmp.pw_len = apply_rules (rules_buf[il_pos].cmds, tmp.i, tmp.pw_len);
|
||||
|
||||
sha1_ctx_t ctx;
|
||||
|
||||
sha1_init (&ctx);
|
||||
|
||||
sha1_update_swap (&ctx, tmp.i, tmp.pw_len);
|
||||
|
||||
sha1_final (&ctx);
|
||||
|
||||
u32 h[5];
|
||||
|
||||
h[0] = ctx.h[0];
|
||||
h[1] = ctx.h[1];
|
||||
h[2] = ctx.h[2];
|
||||
h[3] = ctx.h[3];
|
||||
h[4] = ctx.h[4];
|
||||
|
||||
#define tmp_u8_00 ((h[0] >> 26) & 0x3f)
|
||||
#define tmp_u8_01 ((h[0] >> 20) & 0x3f)
|
||||
#define tmp_u8_02 ((h[0] >> 14) & 0x3f)
|
||||
#define tmp_u8_03 ((h[0] >> 8) & 0x3f)
|
||||
#define tmp_u8_04 ((h[0] >> 2) & 0x3f)
|
||||
#define tmp_u8_05 ((h[0] << 4) & 0x3c) | ((h[1] >> 28) & 0x0f)
|
||||
#define tmp_u8_06 ((h[1] >> 22) & 0x3f)
|
||||
#define tmp_u8_07 ((h[1] >> 16) & 0x3f)
|
||||
#define tmp_u8_08 ((h[1] >> 10) & 0x3f)
|
||||
#define tmp_u8_09 ((h[1] >> 4) & 0x3f)
|
||||
#define tmp_u8_10 ((h[1] << 2) & 0x3c) | ((h[2] >> 30) & 0x03)
|
||||
#define tmp_u8_11 ((h[2] >> 24) & 0x3f)
|
||||
#define tmp_u8_12 ((h[2] >> 18) & 0x3f)
|
||||
#define tmp_u8_13 ((h[2] >> 12) & 0x3f)
|
||||
#define tmp_u8_14 ((h[2] >> 6) & 0x3f)
|
||||
#define tmp_u8_15 ((h[2] >> 0) & 0x3f)
|
||||
#define tmp_u8_16 ((h[3] >> 26) & 0x3f)
|
||||
#define tmp_u8_17 ((h[3] >> 20) & 0x3f)
|
||||
#define tmp_u8_18 ((h[3] >> 14) & 0x3f)
|
||||
#define tmp_u8_19 ((h[3] >> 8) & 0x3f)
|
||||
#define tmp_u8_20 ((h[3] >> 2) & 0x3f)
|
||||
#define tmp_u8_21 ((h[3] << 4) & 0x3c) | ((h[4] >> 28) & 0x0f)
|
||||
#define tmp_u8_22 ((h[4] >> 22) & 0x3f)
|
||||
#define tmp_u8_23 ((h[4] >> 16) & 0x3f)
|
||||
#define tmp_u8_24 ((h[4] >> 10) & 0x3f)
|
||||
#define tmp_u8_25 ((h[4] >> 4) & 0x3f)
|
||||
#define tmp_u8_26 ((h[4] << 2) & 0x3c)
|
||||
|
||||
sha1_init (&ctx);
|
||||
|
||||
ctx.w0[0] = int_to_base64 (tmp_u8_00) << 24
|
||||
| int_to_base64 (tmp_u8_01) << 16
|
||||
| int_to_base64 (tmp_u8_02) << 8
|
||||
| int_to_base64 (tmp_u8_03) << 0;
|
||||
ctx.w0[1] = int_to_base64 (tmp_u8_04) << 24
|
||||
| int_to_base64 (tmp_u8_05) << 16
|
||||
| int_to_base64 (tmp_u8_06) << 8
|
||||
| int_to_base64 (tmp_u8_07) << 0;
|
||||
ctx.w0[2] = int_to_base64 (tmp_u8_08) << 24
|
||||
| int_to_base64 (tmp_u8_09) << 16
|
||||
| int_to_base64 (tmp_u8_10) << 8
|
||||
| int_to_base64 (tmp_u8_11) << 0;
|
||||
ctx.w0[3] = int_to_base64 (tmp_u8_12) << 24
|
||||
| int_to_base64 (tmp_u8_13) << 16
|
||||
| int_to_base64 (tmp_u8_14) << 8
|
||||
| int_to_base64 (tmp_u8_15) << 0;
|
||||
ctx.w1[0] = int_to_base64 (tmp_u8_16) << 24
|
||||
| int_to_base64 (tmp_u8_17) << 16
|
||||
| int_to_base64 (tmp_u8_18) << 8
|
||||
| int_to_base64 (tmp_u8_19) << 0;
|
||||
ctx.w1[1] = int_to_base64 (tmp_u8_20) << 24
|
||||
| int_to_base64 (tmp_u8_21) << 16
|
||||
| int_to_base64 (tmp_u8_22) << 8
|
||||
| int_to_base64 (tmp_u8_23) << 0;
|
||||
ctx.w1[2] = int_to_base64 (tmp_u8_24) << 24
|
||||
| int_to_base64 (tmp_u8_25) << 16
|
||||
| int_to_base64 (tmp_u8_26) << 8
|
||||
| '=' << 0;
|
||||
|
||||
ctx.len = 28;
|
||||
|
||||
sha1_update (&ctx, s, 152);
|
||||
|
||||
sha1_final (&ctx);
|
||||
|
||||
const u32 r0 = ctx.h[DGST_R0];
|
||||
const u32 r1 = ctx.h[DGST_R1];
|
||||
const u32 r2 = ctx.h[DGST_R2];
|
||||
const u32 r3 = ctx.h[DGST_R3];
|
||||
|
||||
COMPARE_S_SCALAR (r0, r1, r2, r3);
|
||||
}
|
||||
}
|
339
OpenCL/m28300_a1-pure.cl
Normal file
339
OpenCL/m28300_a1-pure.cl
Normal file
@ -0,0 +1,339 @@
|
||||
/**
|
||||
* Author......: See docs/credits.txt
|
||||
* License.....: MIT
|
||||
*/
|
||||
|
||||
//#define NEW_SIMD_CODE
|
||||
|
||||
#ifdef KERNEL_STATIC
|
||||
#include "inc_vendor.h"
|
||||
#include "inc_types.h"
|
||||
#include "inc_platform.cl"
|
||||
#include "inc_common.cl"
|
||||
#include "inc_scalar.cl"
|
||||
#include "inc_hash_sha1.cl"
|
||||
#endif
|
||||
|
||||
CONSTANT_VK u32 bin2base64[0x40] =
|
||||
{
|
||||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50,
|
||||
0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66,
|
||||
0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76,
|
||||
0x77, 0x78, 0x79, 0x7a, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x2b, 0x2f,
|
||||
};
|
||||
|
||||
#if VECT_SIZE == 1
|
||||
#define int_to_base64(c) make_u32x (s_bin2base64[(c)])
|
||||
#elif VECT_SIZE == 2
|
||||
#define int_to_base64(c) make_u32x (s_bin2base64[(c).s0], s_bin2base64[(c).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define int_to_base64(c) make_u32x (s_bin2base64[(c).s0], s_bin2base64[(c).s1], s_bin2base64[(c).s2], s_bin2base64[(c).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define int_to_base64(c) make_u32x (s_bin2base64[(c).s0], s_bin2base64[(c).s1], s_bin2base64[(c).s2], s_bin2base64[(c).s3], s_bin2base64[(c).s4], s_bin2base64[(c).s5], s_bin2base64[(c).s6], s_bin2base64[(c).s7])
|
||||
#elif VECT_SIZE == 16
|
||||
#define int_to_base64(c) make_u32x (s_bin2base64[(c).s0], s_bin2base64[(c).s1], s_bin2base64[(c).s2], s_bin2base64[(c).s3], s_bin2base64[(c).s4], s_bin2base64[(c).s5], s_bin2base64[(c).s6], s_bin2base64[(c).s7], s_bin2base64[(c).s8], s_bin2base64[(c).s9], s_bin2base64[(c).sa], s_bin2base64[(c).sb], s_bin2base64[(c).sc], s_bin2base64[(c).sd], s_bin2base64[(c).se], s_bin2base64[(c).sf])
|
||||
#endif
|
||||
|
||||
KERNEL_FQ void m28300_mxx (KERN_ATTR_BASIC ())
|
||||
{
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u64 gid = get_global_id (0);
|
||||
const u64 lid = get_local_id (0);
|
||||
const u64 lsz = get_local_size (0);
|
||||
|
||||
/**
|
||||
* sbox
|
||||
*/
|
||||
|
||||
#ifdef REAL_SHM
|
||||
|
||||
LOCAL_VK u32 s_bin2base64[0x40];
|
||||
|
||||
for (u32 i = lid; i < 0x40; i += lsz)
|
||||
{
|
||||
s_bin2base64[i] = bin2base64[i];
|
||||
}
|
||||
|
||||
SYNC_THREADS ();
|
||||
|
||||
#else
|
||||
|
||||
CONSTANT_AS u32a *s_bin2base64 = bin2base64;
|
||||
|
||||
#endif
|
||||
|
||||
if (gid >= gid_max) return;
|
||||
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u32 salt_len = salt_bufs[SALT_POS].salt_len;
|
||||
|
||||
u32 s[64] = { 0 };
|
||||
|
||||
for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1)
|
||||
{
|
||||
s[idx] = salt_bufs[SALT_POS].salt_buf[idx];
|
||||
}
|
||||
|
||||
sha1_ctx_t ctx0;
|
||||
|
||||
sha1_init (&ctx0);
|
||||
|
||||
sha1_update_global_swap (&ctx0, pws[gid].i, pws[gid].pw_len);
|
||||
|
||||
/**
|
||||
* loop
|
||||
*/
|
||||
|
||||
for (u32 il_pos = 0; il_pos < il_cnt; il_pos++)
|
||||
{
|
||||
sha1_ctx_t ctx = ctx0;
|
||||
|
||||
sha1_update_global_swap (&ctx, combs_buf[il_pos].i, combs_buf[il_pos].pw_len);
|
||||
|
||||
sha1_final (&ctx);
|
||||
|
||||
u32 h[5];
|
||||
|
||||
h[0] = ctx.h[0];
|
||||
h[1] = ctx.h[1];
|
||||
h[2] = ctx.h[2];
|
||||
h[3] = ctx.h[3];
|
||||
h[4] = ctx.h[4];
|
||||
|
||||
#define tmp_u8_00 ((h[0] >> 26) & 0x3f)
|
||||
#define tmp_u8_01 ((h[0] >> 20) & 0x3f)
|
||||
#define tmp_u8_02 ((h[0] >> 14) & 0x3f)
|
||||
#define tmp_u8_03 ((h[0] >> 8) & 0x3f)
|
||||
#define tmp_u8_04 ((h[0] >> 2) & 0x3f)
|
||||
#define tmp_u8_05 ((h[0] << 4) & 0x3c) | ((h[1] >> 28) & 0x0f)
|
||||
#define tmp_u8_06 ((h[1] >> 22) & 0x3f)
|
||||
#define tmp_u8_07 ((h[1] >> 16) & 0x3f)
|
||||
#define tmp_u8_08 ((h[1] >> 10) & 0x3f)
|
||||
#define tmp_u8_09 ((h[1] >> 4) & 0x3f)
|
||||
#define tmp_u8_10 ((h[1] << 2) & 0x3c) | ((h[2] >> 30) & 0x03)
|
||||
#define tmp_u8_11 ((h[2] >> 24) & 0x3f)
|
||||
#define tmp_u8_12 ((h[2] >> 18) & 0x3f)
|
||||
#define tmp_u8_13 ((h[2] >> 12) & 0x3f)
|
||||
#define tmp_u8_14 ((h[2] >> 6) & 0x3f)
|
||||
#define tmp_u8_15 ((h[2] >> 0) & 0x3f)
|
||||
#define tmp_u8_16 ((h[3] >> 26) & 0x3f)
|
||||
#define tmp_u8_17 ((h[3] >> 20) & 0x3f)
|
||||
#define tmp_u8_18 ((h[3] >> 14) & 0x3f)
|
||||
#define tmp_u8_19 ((h[3] >> 8) & 0x3f)
|
||||
#define tmp_u8_20 ((h[3] >> 2) & 0x3f)
|
||||
#define tmp_u8_21 ((h[3] << 4) & 0x3c) | ((h[4] >> 28) & 0x0f)
|
||||
#define tmp_u8_22 ((h[4] >> 22) & 0x3f)
|
||||
#define tmp_u8_23 ((h[4] >> 16) & 0x3f)
|
||||
#define tmp_u8_24 ((h[4] >> 10) & 0x3f)
|
||||
#define tmp_u8_25 ((h[4] >> 4) & 0x3f)
|
||||
#define tmp_u8_26 ((h[4] << 2) & 0x3c)
|
||||
|
||||
sha1_init (&ctx);
|
||||
|
||||
ctx.w0[0] = int_to_base64 (tmp_u8_00) << 24
|
||||
| int_to_base64 (tmp_u8_01) << 16
|
||||
| int_to_base64 (tmp_u8_02) << 8
|
||||
| int_to_base64 (tmp_u8_03) << 0;
|
||||
ctx.w0[1] = int_to_base64 (tmp_u8_04) << 24
|
||||
| int_to_base64 (tmp_u8_05) << 16
|
||||
| int_to_base64 (tmp_u8_06) << 8
|
||||
| int_to_base64 (tmp_u8_07) << 0;
|
||||
ctx.w0[2] = int_to_base64 (tmp_u8_08) << 24
|
||||
| int_to_base64 (tmp_u8_09) << 16
|
||||
| int_to_base64 (tmp_u8_10) << 8
|
||||
| int_to_base64 (tmp_u8_11) << 0;
|
||||
ctx.w0[3] = int_to_base64 (tmp_u8_12) << 24
|
||||
| int_to_base64 (tmp_u8_13) << 16
|
||||
| int_to_base64 (tmp_u8_14) << 8
|
||||
| int_to_base64 (tmp_u8_15) << 0;
|
||||
ctx.w1[0] = int_to_base64 (tmp_u8_16) << 24
|
||||
| int_to_base64 (tmp_u8_17) << 16
|
||||
| int_to_base64 (tmp_u8_18) << 8
|
||||
| int_to_base64 (tmp_u8_19) << 0;
|
||||
ctx.w1[1] = int_to_base64 (tmp_u8_20) << 24
|
||||
| int_to_base64 (tmp_u8_21) << 16
|
||||
| int_to_base64 (tmp_u8_22) << 8
|
||||
| int_to_base64 (tmp_u8_23) << 0;
|
||||
ctx.w1[2] = int_to_base64 (tmp_u8_24) << 24
|
||||
| int_to_base64 (tmp_u8_25) << 16
|
||||
| int_to_base64 (tmp_u8_26) << 8
|
||||
| '=' << 0;
|
||||
|
||||
ctx.len = 28;
|
||||
|
||||
sha1_update (&ctx, s, 152);
|
||||
|
||||
sha1_final (&ctx);
|
||||
|
||||
const u32 r0 = ctx.h[DGST_R0];
|
||||
const u32 r1 = ctx.h[DGST_R1];
|
||||
const u32 r2 = ctx.h[DGST_R2];
|
||||
const u32 r3 = ctx.h[DGST_R3];
|
||||
|
||||
COMPARE_M_SCALAR (r0, r1, r2, r3);
|
||||
}
|
||||
}
|
||||
|
||||
KERNEL_FQ void m28300_sxx (KERN_ATTR_BASIC ())
|
||||
{
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u64 gid = get_global_id (0);
|
||||
const u64 lid = get_local_id (0);
|
||||
const u64 lsz = get_local_size (0);
|
||||
|
||||
/**
|
||||
* sbox
|
||||
*/
|
||||
|
||||
#ifdef REAL_SHM
|
||||
|
||||
LOCAL_VK u32 s_bin2base64[0x40];
|
||||
|
||||
for (u32 i = lid; i < 0x40; i += lsz)
|
||||
{
|
||||
s_bin2base64[i] = bin2base64[i];
|
||||
}
|
||||
|
||||
SYNC_THREADS ();
|
||||
|
||||
#else
|
||||
|
||||
CONSTANT_AS u32a *s_bin2base64 = bin2base64;
|
||||
|
||||
#endif
|
||||
|
||||
if (gid >= gid_max) return;
|
||||
|
||||
/**
|
||||
* digest
|
||||
*/
|
||||
|
||||
const u32 search[4] =
|
||||
{
|
||||
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0],
|
||||
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1],
|
||||
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2],
|
||||
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3]
|
||||
};
|
||||
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u32 salt_len = salt_bufs[SALT_POS].salt_len;
|
||||
|
||||
u32 s[64] = { 0 };
|
||||
|
||||
for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1)
|
||||
{
|
||||
s[idx] = salt_bufs[SALT_POS].salt_buf[idx];
|
||||
}
|
||||
|
||||
sha1_ctx_t ctx0;
|
||||
|
||||
sha1_init (&ctx0);
|
||||
|
||||
sha1_update_global_swap (&ctx0, pws[gid].i, pws[gid].pw_len);
|
||||
|
||||
/**
|
||||
* loop
|
||||
*/
|
||||
|
||||
for (u32 il_pos = 0; il_pos < il_cnt; il_pos++)
|
||||
{
|
||||
sha1_ctx_t ctx = ctx0;
|
||||
|
||||
sha1_update_global_swap (&ctx, combs_buf[il_pos].i, combs_buf[il_pos].pw_len);
|
||||
|
||||
sha1_final (&ctx);
|
||||
|
||||
u32 h[5];
|
||||
|
||||
h[0] = ctx.h[0];
|
||||
h[1] = ctx.h[1];
|
||||
h[2] = ctx.h[2];
|
||||
h[3] = ctx.h[3];
|
||||
h[4] = ctx.h[4];
|
||||
|
||||
#define tmp_u8_00 ((h[0] >> 26) & 0x3f)
|
||||
#define tmp_u8_01 ((h[0] >> 20) & 0x3f)
|
||||
#define tmp_u8_02 ((h[0] >> 14) & 0x3f)
|
||||
#define tmp_u8_03 ((h[0] >> 8) & 0x3f)
|
||||
#define tmp_u8_04 ((h[0] >> 2) & 0x3f)
|
||||
#define tmp_u8_05 ((h[0] << 4) & 0x3c) | ((h[1] >> 28) & 0x0f)
|
||||
#define tmp_u8_06 ((h[1] >> 22) & 0x3f)
|
||||
#define tmp_u8_07 ((h[1] >> 16) & 0x3f)
|
||||
#define tmp_u8_08 ((h[1] >> 10) & 0x3f)
|
||||
#define tmp_u8_09 ((h[1] >> 4) & 0x3f)
|
||||
#define tmp_u8_10 ((h[1] << 2) & 0x3c) | ((h[2] >> 30) & 0x03)
|
||||
#define tmp_u8_11 ((h[2] >> 24) & 0x3f)
|
||||
#define tmp_u8_12 ((h[2] >> 18) & 0x3f)
|
||||
#define tmp_u8_13 ((h[2] >> 12) & 0x3f)
|
||||
#define tmp_u8_14 ((h[2] >> 6) & 0x3f)
|
||||
#define tmp_u8_15 ((h[2] >> 0) & 0x3f)
|
||||
#define tmp_u8_16 ((h[3] >> 26) & 0x3f)
|
||||
#define tmp_u8_17 ((h[3] >> 20) & 0x3f)
|
||||
#define tmp_u8_18 ((h[3] >> 14) & 0x3f)
|
||||
#define tmp_u8_19 ((h[3] >> 8) & 0x3f)
|
||||
#define tmp_u8_20 ((h[3] >> 2) & 0x3f)
|
||||
#define tmp_u8_21 ((h[3] << 4) & 0x3c) | ((h[4] >> 28) & 0x0f)
|
||||
#define tmp_u8_22 ((h[4] >> 22) & 0x3f)
|
||||
#define tmp_u8_23 ((h[4] >> 16) & 0x3f)
|
||||
#define tmp_u8_24 ((h[4] >> 10) & 0x3f)
|
||||
#define tmp_u8_25 ((h[4] >> 4) & 0x3f)
|
||||
#define tmp_u8_26 ((h[4] << 2) & 0x3c)
|
||||
|
||||
sha1_init (&ctx);
|
||||
|
||||
ctx.w0[0] = int_to_base64 (tmp_u8_00) << 24
|
||||
| int_to_base64 (tmp_u8_01) << 16
|
||||
| int_to_base64 (tmp_u8_02) << 8
|
||||
| int_to_base64 (tmp_u8_03) << 0;
|
||||
ctx.w0[1] = int_to_base64 (tmp_u8_04) << 24
|
||||
| int_to_base64 (tmp_u8_05) << 16
|
||||
| int_to_base64 (tmp_u8_06) << 8
|
||||
| int_to_base64 (tmp_u8_07) << 0;
|
||||
ctx.w0[2] = int_to_base64 (tmp_u8_08) << 24
|
||||
| int_to_base64 (tmp_u8_09) << 16
|
||||
| int_to_base64 (tmp_u8_10) << 8
|
||||
| int_to_base64 (tmp_u8_11) << 0;
|
||||
ctx.w0[3] = int_to_base64 (tmp_u8_12) << 24
|
||||
| int_to_base64 (tmp_u8_13) << 16
|
||||
| int_to_base64 (tmp_u8_14) << 8
|
||||
| int_to_base64 (tmp_u8_15) << 0;
|
||||
ctx.w1[0] = int_to_base64 (tmp_u8_16) << 24
|
||||
| int_to_base64 (tmp_u8_17) << 16
|
||||
| int_to_base64 (tmp_u8_18) << 8
|
||||
| int_to_base64 (tmp_u8_19) << 0;
|
||||
ctx.w1[1] = int_to_base64 (tmp_u8_20) << 24
|
||||
| int_to_base64 (tmp_u8_21) << 16
|
||||
| int_to_base64 (tmp_u8_22) << 8
|
||||
| int_to_base64 (tmp_u8_23) << 0;
|
||||
ctx.w1[2] = int_to_base64 (tmp_u8_24) << 24
|
||||
| int_to_base64 (tmp_u8_25) << 16
|
||||
| int_to_base64 (tmp_u8_26) << 8
|
||||
| '=' << 0;
|
||||
|
||||
ctx.len = 28;
|
||||
|
||||
sha1_update (&ctx, s, 152);
|
||||
|
||||
sha1_final (&ctx);
|
||||
|
||||
const u32 r0 = ctx.h[DGST_R0];
|
||||
const u32 r1 = ctx.h[DGST_R1];
|
||||
const u32 r2 = ctx.h[DGST_R2];
|
||||
const u32 r3 = ctx.h[DGST_R3];
|
||||
|
||||
COMPARE_S_SCALAR (r0, r1, r2, r3);
|
||||
}
|
||||
}
|
365
OpenCL/m28300_a3-pure.cl
Normal file
365
OpenCL/m28300_a3-pure.cl
Normal file
@ -0,0 +1,365 @@
|
||||
/**
|
||||
* Author......: See docs/credits.txt
|
||||
* License.....: MIT
|
||||
*/
|
||||
|
||||
#define NEW_SIMD_CODE
|
||||
|
||||
#ifdef KERNEL_STATIC
|
||||
#include "inc_vendor.h"
|
||||
#include "inc_types.h"
|
||||
#include "inc_platform.cl"
|
||||
#include "inc_common.cl"
|
||||
#include "inc_simd.cl"
|
||||
#include "inc_hash_sha1.cl"
|
||||
#endif
|
||||
|
||||
CONSTANT_VK u32 bin2base64[0x40] =
|
||||
{
|
||||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50,
|
||||
0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66,
|
||||
0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76,
|
||||
0x77, 0x78, 0x79, 0x7a, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x2b, 0x2f,
|
||||
};
|
||||
|
||||
#if VECT_SIZE == 1
|
||||
#define int_to_base64(c) make_u32x (s_bin2base64[(c)])
|
||||
#elif VECT_SIZE == 2
|
||||
#define int_to_base64(c) make_u32x (s_bin2base64[(c).s0], s_bin2base64[(c).s1])
|
||||
#elif VECT_SIZE == 4
|
||||
#define int_to_base64(c) make_u32x (s_bin2base64[(c).s0], s_bin2base64[(c).s1], s_bin2base64[(c).s2], s_bin2base64[(c).s3])
|
||||
#elif VECT_SIZE == 8
|
||||
#define int_to_base64(c) make_u32x (s_bin2base64[(c).s0], s_bin2base64[(c).s1], s_bin2base64[(c).s2], s_bin2base64[(c).s3], s_bin2base64[(c).s4], s_bin2base64[(c).s5], s_bin2base64[(c).s6], s_bin2base64[(c).s7])
|
||||
#elif VECT_SIZE == 16
|
||||
#define int_to_base64(c) make_u32x (s_bin2base64[(c).s0], s_bin2base64[(c).s1], s_bin2base64[(c).s2], s_bin2base64[(c).s3], s_bin2base64[(c).s4], s_bin2base64[(c).s5], s_bin2base64[(c).s6], s_bin2base64[(c).s7], s_bin2base64[(c).s8], s_bin2base64[(c).s9], s_bin2base64[(c).sa], s_bin2base64[(c).sb], s_bin2base64[(c).sc], s_bin2base64[(c).sd], s_bin2base64[(c).se], s_bin2base64[(c).sf])
|
||||
#endif
|
||||
|
||||
KERNEL_FQ void m28300_mxx (KERN_ATTR_VECTOR ())
|
||||
{
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u64 gid = get_global_id (0);
|
||||
const u64 lid = get_local_id (0);
|
||||
const u64 lsz = get_local_size (0);
|
||||
|
||||
/**
|
||||
* sbox
|
||||
*/
|
||||
|
||||
#ifdef REAL_SHM
|
||||
|
||||
LOCAL_VK u32 s_bin2base64[0x40];
|
||||
|
||||
for (u32 i = lid; i < 0x40; i += lsz)
|
||||
{
|
||||
s_bin2base64[i] = bin2base64[i];
|
||||
}
|
||||
|
||||
SYNC_THREADS ();
|
||||
|
||||
#else
|
||||
|
||||
CONSTANT_AS u32a *s_bin2base64 = bin2base64;
|
||||
|
||||
#endif
|
||||
|
||||
if (gid >= gid_max) return;
|
||||
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u32 pw_len = pws[gid].pw_len;
|
||||
|
||||
u32x w[64] = { 0 };
|
||||
|
||||
for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1)
|
||||
{
|
||||
w[idx] = pws[gid].i[idx];
|
||||
}
|
||||
|
||||
const u32 salt_len = salt_bufs[SALT_POS].salt_len;
|
||||
|
||||
u32x s[64] = { 0 };
|
||||
|
||||
for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1)
|
||||
{
|
||||
s[idx] = salt_bufs[SALT_POS].salt_buf[idx];
|
||||
}
|
||||
|
||||
/**
|
||||
* loop
|
||||
*/
|
||||
|
||||
u32x w0l = w[0];
|
||||
|
||||
for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
|
||||
{
|
||||
const u32x w0r = words_buf_r[il_pos / VECT_SIZE];
|
||||
|
||||
const u32x w0 = w0l | w0r;
|
||||
|
||||
w[0] = w0;
|
||||
|
||||
sha1_ctx_vector_t ctx;
|
||||
|
||||
sha1_init_vector (&ctx);
|
||||
|
||||
sha1_update_vector (&ctx, w, pw_len);
|
||||
|
||||
sha1_final_vector (&ctx);
|
||||
|
||||
u32x h[5];
|
||||
|
||||
h[0] = ctx.h[0];
|
||||
h[1] = ctx.h[1];
|
||||
h[2] = ctx.h[2];
|
||||
h[3] = ctx.h[3];
|
||||
h[4] = ctx.h[4];
|
||||
|
||||
#define tmp_u8_00 ((h[0] >> 26) & 0x3f)
|
||||
#define tmp_u8_01 ((h[0] >> 20) & 0x3f)
|
||||
#define tmp_u8_02 ((h[0] >> 14) & 0x3f)
|
||||
#define tmp_u8_03 ((h[0] >> 8) & 0x3f)
|
||||
#define tmp_u8_04 ((h[0] >> 2) & 0x3f)
|
||||
#define tmp_u8_05 ((h[0] << 4) & 0x3c) | ((h[1] >> 28) & 0x0f)
|
||||
#define tmp_u8_06 ((h[1] >> 22) & 0x3f)
|
||||
#define tmp_u8_07 ((h[1] >> 16) & 0x3f)
|
||||
#define tmp_u8_08 ((h[1] >> 10) & 0x3f)
|
||||
#define tmp_u8_09 ((h[1] >> 4) & 0x3f)
|
||||
#define tmp_u8_10 ((h[1] << 2) & 0x3c) | ((h[2] >> 30) & 0x03)
|
||||
#define tmp_u8_11 ((h[2] >> 24) & 0x3f)
|
||||
#define tmp_u8_12 ((h[2] >> 18) & 0x3f)
|
||||
#define tmp_u8_13 ((h[2] >> 12) & 0x3f)
|
||||
#define tmp_u8_14 ((h[2] >> 6) & 0x3f)
|
||||
#define tmp_u8_15 ((h[2] >> 0) & 0x3f)
|
||||
#define tmp_u8_16 ((h[3] >> 26) & 0x3f)
|
||||
#define tmp_u8_17 ((h[3] >> 20) & 0x3f)
|
||||
#define tmp_u8_18 ((h[3] >> 14) & 0x3f)
|
||||
#define tmp_u8_19 ((h[3] >> 8) & 0x3f)
|
||||
#define tmp_u8_20 ((h[3] >> 2) & 0x3f)
|
||||
#define tmp_u8_21 ((h[3] << 4) & 0x3c) | ((h[4] >> 28) & 0x0f)
|
||||
#define tmp_u8_22 ((h[4] >> 22) & 0x3f)
|
||||
#define tmp_u8_23 ((h[4] >> 16) & 0x3f)
|
||||
#define tmp_u8_24 ((h[4] >> 10) & 0x3f)
|
||||
#define tmp_u8_25 ((h[4] >> 4) & 0x3f)
|
||||
#define tmp_u8_26 ((h[4] << 2) & 0x3c)
|
||||
|
||||
sha1_init_vector (&ctx);
|
||||
|
||||
ctx.w0[0] = int_to_base64 (tmp_u8_00) << 24
|
||||
| int_to_base64 (tmp_u8_01) << 16
|
||||
| int_to_base64 (tmp_u8_02) << 8
|
||||
| int_to_base64 (tmp_u8_03) << 0;
|
||||
ctx.w0[1] = int_to_base64 (tmp_u8_04) << 24
|
||||
| int_to_base64 (tmp_u8_05) << 16
|
||||
| int_to_base64 (tmp_u8_06) << 8
|
||||
| int_to_base64 (tmp_u8_07) << 0;
|
||||
ctx.w0[2] = int_to_base64 (tmp_u8_08) << 24
|
||||
| int_to_base64 (tmp_u8_09) << 16
|
||||
| int_to_base64 (tmp_u8_10) << 8
|
||||
| int_to_base64 (tmp_u8_11) << 0;
|
||||
ctx.w0[3] = int_to_base64 (tmp_u8_12) << 24
|
||||
| int_to_base64 (tmp_u8_13) << 16
|
||||
| int_to_base64 (tmp_u8_14) << 8
|
||||
| int_to_base64 (tmp_u8_15) << 0;
|
||||
ctx.w1[0] = int_to_base64 (tmp_u8_16) << 24
|
||||
| int_to_base64 (tmp_u8_17) << 16
|
||||
| int_to_base64 (tmp_u8_18) << 8
|
||||
| int_to_base64 (tmp_u8_19) << 0;
|
||||
ctx.w1[1] = int_to_base64 (tmp_u8_20) << 24
|
||||
| int_to_base64 (tmp_u8_21) << 16
|
||||
| int_to_base64 (tmp_u8_22) << 8
|
||||
| int_to_base64 (tmp_u8_23) << 0;
|
||||
ctx.w1[2] = int_to_base64 (tmp_u8_24) << 24
|
||||
| int_to_base64 (tmp_u8_25) << 16
|
||||
| int_to_base64 (tmp_u8_26) << 8
|
||||
| '=' << 0;
|
||||
|
||||
ctx.len = 28;
|
||||
|
||||
sha1_update_vector (&ctx, s, 152);
|
||||
|
||||
sha1_final_vector (&ctx);
|
||||
|
||||
const u32x r0 = ctx.h[DGST_R0];
|
||||
const u32x r1 = ctx.h[DGST_R1];
|
||||
const u32x r2 = ctx.h[DGST_R2];
|
||||
const u32x r3 = ctx.h[DGST_R3];
|
||||
|
||||
COMPARE_M_SIMD (r0, r1, r2, r3);
|
||||
}
|
||||
}
|
||||
|
||||
KERNEL_FQ void m28300_sxx (KERN_ATTR_VECTOR ())
|
||||
{
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u64 gid = get_global_id (0);
|
||||
const u64 lid = get_local_id (0);
|
||||
const u64 lsz = get_local_size (0);
|
||||
|
||||
/**
|
||||
* sbox
|
||||
*/
|
||||
|
||||
#ifdef REAL_SHM
|
||||
|
||||
LOCAL_VK u32 s_bin2base64[0x40];
|
||||
|
||||
for (u32 i = lid; i < 0x40; i += lsz)
|
||||
{
|
||||
s_bin2base64[i] = bin2base64[i];
|
||||
}
|
||||
|
||||
SYNC_THREADS ();
|
||||
|
||||
#else
|
||||
|
||||
CONSTANT_AS u32a *s_bin2base64 = bin2base64;
|
||||
|
||||
#endif
|
||||
|
||||
if (gid >= gid_max) return;
|
||||
|
||||
/**
|
||||
* digest
|
||||
*/
|
||||
|
||||
const u32 search[4] =
|
||||
{
|
||||
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0],
|
||||
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1],
|
||||
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2],
|
||||
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3]
|
||||
};
|
||||
|
||||
/**
|
||||
* base
|
||||
*/
|
||||
|
||||
const u32 pw_len = pws[gid].pw_len;
|
||||
|
||||
u32x w[64] = { 0 };
|
||||
|
||||
for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1)
|
||||
{
|
||||
w[idx] = pws[gid].i[idx];
|
||||
}
|
||||
|
||||
const u32 salt_len = salt_bufs[SALT_POS].salt_len;
|
||||
|
||||
u32x s[64] = { 0 };
|
||||
|
||||
for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1)
|
||||
{
|
||||
s[idx] = salt_bufs[SALT_POS].salt_buf[idx];
|
||||
}
|
||||
|
||||
/**
|
||||
* loop
|
||||
*/
|
||||
|
||||
u32x w0l = w[0];
|
||||
|
||||
for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
|
||||
{
|
||||
const u32x w0r = words_buf_r[il_pos / VECT_SIZE];
|
||||
|
||||
const u32x w0 = w0l | w0r;
|
||||
|
||||
w[0] = w0;
|
||||
|
||||
sha1_ctx_vector_t ctx;
|
||||
|
||||
sha1_init_vector (&ctx);
|
||||
|
||||
sha1_update_vector (&ctx, w, pw_len);
|
||||
|
||||
sha1_final_vector (&ctx);
|
||||
|
||||
u32x h[5];
|
||||
|
||||
h[0] = ctx.h[0];
|
||||
h[1] = ctx.h[1];
|
||||
h[2] = ctx.h[2];
|
||||
h[3] = ctx.h[3];
|
||||
h[4] = ctx.h[4];
|
||||
|
||||
#define tmp_u8_00 ((h[0] >> 26) & 0x3f)
|
||||
#define tmp_u8_01 ((h[0] >> 20) & 0x3f)
|
||||
#define tmp_u8_02 ((h[0] >> 14) & 0x3f)
|
||||
#define tmp_u8_03 ((h[0] >> 8) & 0x3f)
|
||||
#define tmp_u8_04 ((h[0] >> 2) & 0x3f)
|
||||
#define tmp_u8_05 ((h[0] << 4) & 0x3c) | ((h[1] >> 28) & 0x0f)
|
||||
#define tmp_u8_06 ((h[1] >> 22) & 0x3f)
|
||||
#define tmp_u8_07 ((h[1] >> 16) & 0x3f)
|
||||
#define tmp_u8_08 ((h[1] >> 10) & 0x3f)
|
||||
#define tmp_u8_09 ((h[1] >> 4) & 0x3f)
|
||||
#define tmp_u8_10 ((h[1] << 2) & 0x3c) | ((h[2] >> 30) & 0x03)
|
||||
#define tmp_u8_11 ((h[2] >> 24) & 0x3f)
|
||||
#define tmp_u8_12 ((h[2] >> 18) & 0x3f)
|
||||
#define tmp_u8_13 ((h[2] >> 12) & 0x3f)
|
||||
#define tmp_u8_14 ((h[2] >> 6) & 0x3f)
|
||||
#define tmp_u8_15 ((h[2] >> 0) & 0x3f)
|
||||
#define tmp_u8_16 ((h[3] >> 26) & 0x3f)
|
||||
#define tmp_u8_17 ((h[3] >> 20) & 0x3f)
|
||||
#define tmp_u8_18 ((h[3] >> 14) & 0x3f)
|
||||
#define tmp_u8_19 ((h[3] >> 8) & 0x3f)
|
||||
#define tmp_u8_20 ((h[3] >> 2) & 0x3f)
|
||||
#define tmp_u8_21 ((h[3] << 4) & 0x3c) | ((h[4] >> 28) & 0x0f)
|
||||
#define tmp_u8_22 ((h[4] >> 22) & 0x3f)
|
||||
#define tmp_u8_23 ((h[4] >> 16) & 0x3f)
|
||||
#define tmp_u8_24 ((h[4] >> 10) & 0x3f)
|
||||
#define tmp_u8_25 ((h[4] >> 4) & 0x3f)
|
||||
#define tmp_u8_26 ((h[4] << 2) & 0x3c)
|
||||
|
||||
sha1_init_vector (&ctx);
|
||||
|
||||
ctx.w0[0] = int_to_base64 (tmp_u8_00) << 24
|
||||
| int_to_base64 (tmp_u8_01) << 16
|
||||
| int_to_base64 (tmp_u8_02) << 8
|
||||
| int_to_base64 (tmp_u8_03) << 0;
|
||||
ctx.w0[1] = int_to_base64 (tmp_u8_04) << 24
|
||||
| int_to_base64 (tmp_u8_05) << 16
|
||||
| int_to_base64 (tmp_u8_06) << 8
|
||||
| int_to_base64 (tmp_u8_07) << 0;
|
||||
ctx.w0[2] = int_to_base64 (tmp_u8_08) << 24
|
||||
| int_to_base64 (tmp_u8_09) << 16
|
||||
| int_to_base64 (tmp_u8_10) << 8
|
||||
| int_to_base64 (tmp_u8_11) << 0;
|
||||
ctx.w0[3] = int_to_base64 (tmp_u8_12) << 24
|
||||
| int_to_base64 (tmp_u8_13) << 16
|
||||
| int_to_base64 (tmp_u8_14) << 8
|
||||
| int_to_base64 (tmp_u8_15) << 0;
|
||||
ctx.w1[0] = int_to_base64 (tmp_u8_16) << 24
|
||||
| int_to_base64 (tmp_u8_17) << 16
|
||||
| int_to_base64 (tmp_u8_18) << 8
|
||||
| int_to_base64 (tmp_u8_19) << 0;
|
||||
ctx.w1[1] = int_to_base64 (tmp_u8_20) << 24
|
||||
| int_to_base64 (tmp_u8_21) << 16
|
||||
| int_to_base64 (tmp_u8_22) << 8
|
||||
| int_to_base64 (tmp_u8_23) << 0;
|
||||
ctx.w1[2] = int_to_base64 (tmp_u8_24) << 24
|
||||
| int_to_base64 (tmp_u8_25) << 16
|
||||
| int_to_base64 (tmp_u8_26) << 8
|
||||
| '=' << 0;
|
||||
|
||||
ctx.len = 28;
|
||||
|
||||
sha1_update_vector (&ctx, s, 152);
|
||||
|
||||
sha1_final_vector (&ctx);
|
||||
|
||||
const u32x r0 = ctx.h[DGST_R0];
|
||||
const u32x r1 = ctx.h[DGST_R1];
|
||||
const u32x r2 = ctx.h[DGST_R2];
|
||||
const u32x r3 = ctx.h[DGST_R3];
|
||||
|
||||
COMPARE_S_SIMD (r0, r1, r2, r3);
|
||||
}
|
||||
}
|
@ -5,12 +5,14 @@
|
||||
##
|
||||
|
||||
- Added hash-mode: Exodus Desktop Wallet (scrypt)
|
||||
- Added hash-mode: Teamspeak 3 (channel hash)
|
||||
|
||||
##
|
||||
## Features
|
||||
##
|
||||
|
||||
- Added support to use --debug-mode in attack-mode 9 (Association Attack)
|
||||
- Added guess data to --status-json output
|
||||
|
||||
##
|
||||
## Bugs
|
||||
@ -19,15 +21,18 @@
|
||||
- Fixed functional error when nonce-error-corrections that were set on the command line in hash-mode 22000/22001 were not accepted
|
||||
- Fixed missing option flag OPTS_TYPE_SUGGEST_KG for hash-mode 11600 to inform the user about possible false positives in this mode
|
||||
- Fixed undefined function call to hc_byte_perm_S() in hash-mode 17010 on non-CUDA compute devices
|
||||
- Fixed HEX wordlist handling in -m 3000
|
||||
|
||||
##
|
||||
## Technical
|
||||
##
|
||||
|
||||
- Association Attack: Enable module specific pw_min and pw_max settings to avoid false positives in -a 9 attack-mode
|
||||
- Backend Info: Added local memory size to output
|
||||
- Tuning Database: Added a warning if a module implements module_extra_tuningdb_block but the installed computing device is not found
|
||||
- Usage Screen: On windows console, wait for any keypress if usage_mini_print() is used
|
||||
- User Options: Add new module function module_hash_decode_postprocess() to override hash specific configurations from command line
|
||||
- OpenCL Backend: added workaround to make optimized kernels work on Apple Silicon
|
||||
- OpenCL Runtime: Added support to use Apple Silicon compute devices
|
||||
- OpenCL Runtime: Set default device-type to GPU with Apple Silicon compute devices
|
||||
- Unit tests: Updated test.sh to set default device-type to CPU with Apple Intel, force pure kernel with Apple Silicon and add -f (--force) option
|
||||
|
@ -797,7 +797,7 @@ One very unique feature is that the tokenizer allows you to have both dynamic le
|
||||
The first step after declaring the tokenizer context buffer is to create its configuration. There is just one mandatory parameter and a maximum of 128 optional configuration items (columns). The mandatory configuration item needs to be set to the number of columns/fields which the hash line includes. Note that this is a fixed value. For more complex hash lines with a dynamic column count you need to create multiple tokenizer instances (e.g. use a second configuration, if the first one failed), but in most of the times this is not required.
|
||||
|
||||
```
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 1;
|
||||
```
|
||||
|
@ -386,6 +386,7 @@ NVIDIA GPUs require "NVIDIA Driver" (440.64 or later) and "CUDA Toolkit" (9.0 or
|
||||
- RSA/DSA/EC/OpenSSH Private Keys ($4$)
|
||||
- RSA/DSA/EC/OpenSSH Private Keys ($5$)
|
||||
- XMPP SCRAM PBKDF2-SHA1
|
||||
- Teamspeak 3 (channel hash)
|
||||
- Telegram Desktop < v2.1.14 (PBKDF2-HMAC-SHA1)
|
||||
- Telegram Desktop >= v2.1.14 (PBKDF2-HMAC-SHA512)
|
||||
- Telegram Mobile App Passcode (SHA256)
|
||||
|
@ -101,6 +101,10 @@ const char *stroptitype (const u32 opti_type);
|
||||
bool generic_salt_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, const u8 *in_buf, const int in_len, u8 *out_buf, int *out_len);
|
||||
int generic_salt_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, const u8 *in_buf, const int in_len, u8 *out_buf);
|
||||
|
||||
int input_tokenizer (const u8 *input_buf, const int input_len, token_t *token);
|
||||
int input_tokenizer (const u8 *input_buf, const int input_len, hc_token_t *token);
|
||||
|
||||
#if defined (__APPLE__)
|
||||
bool is_apple_silicon (void);
|
||||
#endif
|
||||
|
||||
#endif // _SHARED_H
|
||||
|
@ -2800,7 +2800,7 @@ typedef struct hook_thread_param
|
||||
#define MAX_TOKENS 128
|
||||
#define MAX_SIGNATURES 16
|
||||
|
||||
typedef struct token
|
||||
typedef struct hc_token
|
||||
{
|
||||
int token_cnt;
|
||||
|
||||
@ -2820,7 +2820,7 @@ typedef struct token
|
||||
const u8 *opt_buf;
|
||||
int opt_len;
|
||||
|
||||
} token_t;
|
||||
} hc_token_t;
|
||||
|
||||
/**
|
||||
* hash category is relevant in usage.c (--help screen)
|
||||
|
@ -341,22 +341,15 @@ static bool setup_opencl_device_types_filter (hashcat_ctx_t *hashcat_ctx, const
|
||||
{
|
||||
#if defined (__APPLE__)
|
||||
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
size_t size;
|
||||
cpu_type_t cpu_type = 0;
|
||||
size = sizeof (cpu_type);
|
||||
sysctlbyname ("hw.cputype", &cpu_type, &size, NULL, 0);
|
||||
|
||||
if (cpu_type == 0x100000c)
|
||||
if (is_apple_silicon() == true)
|
||||
{
|
||||
// For apple M1* use GPU only, because CPU device it is not recognized by OpenCL
|
||||
// With Apple's M1* use GPU only, because CPU device it is not recognized by OpenCL
|
||||
|
||||
opencl_device_types_filter = CL_DEVICE_TYPE_GPU;
|
||||
}
|
||||
else
|
||||
{
|
||||
// For apple use CPU only, because GPU drivers are not reliable
|
||||
// With Apple Intel use CPU only, because GPU drivers are not reliable
|
||||
// The user can explicitly enable GPU by setting -D2
|
||||
|
||||
//opencl_device_types_filter = CL_DEVICE_TYPE_ALL & ~CL_DEVICE_TYPE_GPU;
|
||||
@ -470,7 +463,6 @@ static bool opencl_test_instruction (hashcat_ctx_t *hashcat_ctx, cl_context cont
|
||||
|
||||
OCL_PTR *ocl = (OCL_PTR *) backend_ctx->ocl;
|
||||
|
||||
|
||||
#ifndef DEBUG
|
||||
const int fd_stderr = fileno (stderr);
|
||||
const int stderr_bak = dup (fd_stderr);
|
||||
@ -11013,19 +11005,22 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
if (_kernel_accel == (u32) -1) // native, makes sense if OPTS_TYPE_MP_MULTI_DISABLE is used
|
||||
{
|
||||
if (module_ctx->module_extra_tuningdb_block != MODULE_DEFAULT)
|
||||
if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
||||
{
|
||||
event_log_warning (hashcat_ctx, "ATTENTION! This hash-mode requires manual tuning to achieve full performance.");
|
||||
event_log_warning (hashcat_ctx, "The loss of performance can be greater than 100%% without manual tuning.");
|
||||
event_log_warning (hashcat_ctx, NULL);
|
||||
event_log_warning (hashcat_ctx, "This warning message disappears after a definition for the installed");
|
||||
event_log_warning (hashcat_ctx, "compute-device in this computer has been added to either list:");
|
||||
event_log_warning (hashcat_ctx, "- src/modules/module_%05d.c", hashconfig->hash_mode);
|
||||
event_log_warning (hashcat_ctx, "- hashcat.hctune");
|
||||
event_log_warning (hashcat_ctx, NULL);
|
||||
event_log_warning (hashcat_ctx, "For instructions on tuning, see src/modules/module_%05d.c", hashconfig->hash_mode);
|
||||
event_log_warning (hashcat_ctx, "Also, consider sending a PR to Hashcat Master so that other users can benefit from your work.");
|
||||
event_log_warning (hashcat_ctx, NULL);
|
||||
if (module_ctx->module_extra_tuningdb_block != MODULE_DEFAULT)
|
||||
{
|
||||
event_log_warning (hashcat_ctx, "ATTENTION! This hash-mode requires manual tuning to achieve full performance.");
|
||||
event_log_warning (hashcat_ctx, "The loss of performance can be greater than 100%% without manual tuning.");
|
||||
event_log_warning (hashcat_ctx, NULL);
|
||||
event_log_warning (hashcat_ctx, "This warning message disappears after a definition for the installed");
|
||||
event_log_warning (hashcat_ctx, "compute-device in this computer has been added to either list:");
|
||||
event_log_warning (hashcat_ctx, "- src/modules/module_%05d.c", hashconfig->hash_mode);
|
||||
event_log_warning (hashcat_ctx, "- hashcat.hctune");
|
||||
event_log_warning (hashcat_ctx, NULL);
|
||||
event_log_warning (hashcat_ctx, "For instructions on tuning, see src/modules/module_%05d.c", hashconfig->hash_mode);
|
||||
event_log_warning (hashcat_ctx, "Also, consider sending a PR to Hashcat Master so that other users can benefit from your work.");
|
||||
event_log_warning (hashcat_ctx, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
device_param->kernel_accel_min = device_param->device_processors;
|
||||
@ -11477,6 +11472,13 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
build_options_len += snprintf (build_options_buf + build_options_len, build_options_sz - build_options_len, "-D KERNEL_STATIC -I OpenCL -I \"%s\" ", folder_config->cpath_real);
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (is_apple_silicon() == true)
|
||||
{
|
||||
build_options_len += snprintf (build_options_buf + build_options_len, build_options_sz - build_options_len, "-D IS_APPLE_SILICON ");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* currently disabled, hangs NEO drivers since 20.09.
|
||||
|
@ -34,7 +34,7 @@ bool initialize_keyboard_layout_mapping (const char *filename, keyboard_layout_m
|
||||
|
||||
if (line_len == 0) continue;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -52,7 +52,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 1;
|
||||
|
||||
|
@ -52,7 +52,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -52,7 +52,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -52,7 +52,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -51,7 +51,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -51,7 +51,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -53,7 +53,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -53,7 +53,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -51,7 +51,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -53,7 +53,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -52,7 +52,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -47,7 +47,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -47,7 +47,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -53,7 +53,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 1;
|
||||
|
||||
|
@ -51,7 +51,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 1;
|
||||
|
||||
|
@ -51,7 +51,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -51,7 +51,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -54,7 +54,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -59,7 +59,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -51,7 +51,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -52,7 +52,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -52,7 +52,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -53,7 +53,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 3;
|
||||
|
||||
|
@ -52,7 +52,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -52,7 +52,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -56,7 +56,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 4;
|
||||
|
||||
|
@ -55,7 +55,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 3;
|
||||
|
||||
|
@ -52,7 +52,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 1;
|
||||
|
||||
|
@ -52,7 +52,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -55,7 +55,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 4;
|
||||
|
||||
|
@ -47,7 +47,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -47,7 +47,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -52,7 +52,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 1;
|
||||
|
||||
|
@ -44,7 +44,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 1;
|
||||
|
||||
|
@ -50,7 +50,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 1;
|
||||
|
||||
|
@ -169,7 +169,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 4;
|
||||
|
||||
|
@ -169,7 +169,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 3;
|
||||
|
||||
|
@ -248,7 +248,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 1;
|
||||
|
||||
@ -269,7 +269,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
|
||||
u8 *md5crypt_hash = decrypted + 12;
|
||||
|
||||
token_t token2;
|
||||
hc_token_t token2;
|
||||
|
||||
token2.token_cnt = 3;
|
||||
|
||||
|
@ -48,7 +48,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u64 *digest = (u64 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -52,7 +52,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 1;
|
||||
|
||||
|
@ -55,7 +55,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 1;
|
||||
|
||||
|
@ -53,7 +53,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -51,7 +51,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 1;
|
||||
|
||||
|
@ -51,7 +51,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 1;
|
||||
|
||||
|
@ -51,7 +51,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -53,7 +53,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -51,7 +51,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -51,7 +51,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -52,7 +52,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -52,7 +52,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -55,7 +55,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 4;
|
||||
|
||||
|
@ -46,7 +46,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -78,7 +78,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -52,7 +52,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 1;
|
||||
|
||||
|
@ -199,7 +199,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -169,7 +169,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 3;
|
||||
|
||||
|
@ -77,7 +77,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u64 *digest = (u64 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 1;
|
||||
|
||||
|
@ -52,7 +52,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u64 *digest = (u64 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -54,7 +54,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u64 *digest = (u64 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -77,7 +77,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u64 *digest = (u64 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -78,7 +78,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u64 *digest = (u64 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -53,7 +53,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u64 *digest = (u64 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -56,7 +56,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u64 *digest = (u64 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 3;
|
||||
|
||||
|
@ -53,7 +53,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u64 *digest = (u64 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -47,7 +47,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u64 *digest = (u64 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -48,7 +48,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u64 *digest = (u64 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -67,7 +67,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u64 *digest = (u64 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 1;
|
||||
|
||||
|
@ -475,7 +475,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u64 *digest = (u64 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 3;
|
||||
|
||||
|
@ -75,7 +75,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 4;
|
||||
|
||||
|
@ -48,7 +48,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 1;
|
||||
|
||||
|
@ -47,7 +47,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -49,7 +49,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 1;
|
||||
|
||||
|
@ -49,7 +49,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -52,7 +52,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 3;
|
||||
|
||||
|
@ -49,7 +49,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -77,7 +77,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -159,7 +159,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 1;
|
||||
|
||||
|
@ -73,7 +73,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -175,7 +175,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 4;
|
||||
|
||||
|
@ -49,7 +49,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 1;
|
||||
|
||||
|
@ -60,7 +60,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -62,7 +62,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 3;
|
||||
|
||||
|
@ -49,7 +49,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -79,7 +79,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -63,7 +63,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
@ -61,7 +61,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
{
|
||||
u32 *digest = (u32 *) digest_buf;
|
||||
|
||||
token_t token;
|
||||
hc_token_t token;
|
||||
|
||||
token.token_cnt = 2;
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user