Prepare for pure kernel rule engine support

This commit is contained in:
jsteube
2017-08-11 16:09:12 +02:00
parent 34d882a116
commit 8a0d21360b
78 changed files with 956 additions and 310 deletions

View File

@@ -77,13 +77,15 @@ __kernel void m04500_mxx (__global pw_t *pws, __global const kernel_rule_t *rule
for (u32 il_pos = 0; il_pos < il_cnt; il_pos++)
{
// todo: add rules engine
u32 out_buf[64] = { 0 };
const u32 out_len = apply_rules (rules_buf[il_pos].cmds, w, pw_len, out_buf);
sha1_ctx_t ctx0;
sha1_init (&ctx0);
sha1_update_swap (&ctx0, w, pw_len);
sha1_update_swap (&ctx0, out_buf, out_len);
sha1_final (&ctx0);
@@ -193,13 +195,15 @@ __kernel void m04500_sxx (__global pw_t *pws, __global const kernel_rule_t *rule
for (u32 il_pos = 0; il_pos < il_cnt; il_pos++)
{
// todo: add rules engine
u32 out_buf[64] = { 0 };
const u32 out_len = apply_rules (rules_buf[il_pos].cmds, w, pw_len, out_buf);
sha1_ctx_t ctx0;
sha1_init (&ctx0);
sha1_update_swap (&ctx0, w, pw_len);
sha1_update_swap (&ctx0, out_buf, out_len);
sha1_final (&ctx0);