Move hash_mode specific code which enforce the use of the JiT compiler to modules

This commit is contained in:
jsteube
2019-01-04 11:23:48 +01:00
parent c88a837196
commit 5633d6808f
5 changed files with 397 additions and 212 deletions
+3
View File
@@ -49,6 +49,9 @@ int module_hash_decode_zero_hash (MAYBE_UNUSED const hashconfig_t *ha
int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, const char *line_buf, MAYBE_UNUSED const int line_len);
int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, char *line_buf, MAYBE_UNUSED const int line_size);
u64 module_extra_buffer_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param);
char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param);
void module_hook12 (hc_device_param_t *device_param, void *hook_salts_buf, const u32 salt_pos, const u64 pws_cnt);
void module_hook23 (hc_device_param_t *device_param, void *hook_salts_buf, const u32 salt_pos, const u64 pws_cnt);
+8 -4
View File
@@ -964,6 +964,7 @@ struct hashconfig
bool outfile_check_nocomp;
bool potfile_disable;
bool potfile_keep_all_hashes;
bool forced_jit_compile;
u32 pwdump_column;
};
@@ -1315,10 +1316,10 @@ typedef struct hc_device_param
cl_mem d_tmps;
cl_mem d_hooks;
cl_mem d_result;
cl_mem d_scryptV0_buf;
cl_mem d_scryptV1_buf;
cl_mem d_scryptV2_buf;
cl_mem d_scryptV3_buf;
cl_mem d_extra0_buf;
cl_mem d_extra1_buf;
cl_mem d_extra2_buf;
cl_mem d_extra3_buf;
cl_mem d_root_css_buf;
cl_mem d_markov_css_buf;
cl_mem d_st_digests_buf;
@@ -2285,6 +2286,9 @@ typedef struct module_ctx
int (*module_hash_decode) (const hashconfig_t *, void *, salt_t *, void *, const char *, const int);
int (*module_hash_encode) (const hashconfig_t *, const void *, const salt_t *, const void *, char *, int);
u64 (*module_extra_buffer_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *, const hashes_t *, const hc_device_param_t *);
char *(*module_jit_build_options) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *, const hashes_t *, const hc_device_param_t *);
void (*module_hook12) (hc_device_param_t *, const void *, const u32, const u64);
void (*module_hook23) (hc_device_param_t *, const void *, const u32, const u64);