mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-22 16:18:09 +00:00
Add some accel and thread limits to -m 21700 and -m 21800 for a smoother benchmark and checkpoint experience
This commit is contained in:
parent
14ea59c001
commit
d0ad516422
@ -82,6 +82,23 @@ typedef struct electrum_hook_salt
|
||||
|
||||
static const char *SIGNATURE_ELECTRUM = "$electrum$4*";
|
||||
|
||||
#define M21700_MAX_ACCEL 1
|
||||
#define M21700_MAX_THREADS 8
|
||||
|
||||
u32 module_kernel_accel_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
|
||||
{
|
||||
const u32 kernel_accel_max = (user_options->kernel_accel_chgd == true) ? user_options->kernel_accel : M21700_MAX_ACCEL;
|
||||
|
||||
return kernel_accel_max;
|
||||
}
|
||||
|
||||
u32 module_kernel_threads_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
|
||||
{
|
||||
const u32 kernel_threads_max = (user_options->kernel_threads_chgd == true) ? user_options->kernel_threads : M21700_MAX_THREADS;
|
||||
|
||||
return kernel_threads_max;
|
||||
}
|
||||
|
||||
void module_hook23 (hc_device_param_t *device_param, const void *hook_salts_buf, const u32 salt_pos, const u64 pw_pos)
|
||||
{
|
||||
electrum_hook_t *hook_items = (electrum_hook_t *) device_param->hooks_buf;
|
||||
@ -371,11 +388,11 @@ void module_init (module_ctx_t *module_ctx)
|
||||
module_ctx->module_hook_size = module_hook_size;
|
||||
module_ctx->module_jit_build_options = module_jit_build_options;
|
||||
module_ctx->module_jit_cache_disable = MODULE_DEFAULT;
|
||||
module_ctx->module_kernel_accel_max = MODULE_DEFAULT;
|
||||
module_ctx->module_kernel_accel_max = module_kernel_accel_max;
|
||||
module_ctx->module_kernel_accel_min = MODULE_DEFAULT;
|
||||
module_ctx->module_kernel_loops_max = MODULE_DEFAULT;
|
||||
module_ctx->module_kernel_loops_min = MODULE_DEFAULT;
|
||||
module_ctx->module_kernel_threads_max = MODULE_DEFAULT;
|
||||
module_ctx->module_kernel_threads_max = module_kernel_threads_max;
|
||||
module_ctx->module_kernel_threads_min = MODULE_DEFAULT;
|
||||
module_ctx->module_kern_type = module_kern_type;
|
||||
module_ctx->module_kern_type_dynamic = MODULE_DEFAULT;
|
||||
|
@ -79,6 +79,23 @@ typedef struct electrum_hook_salt
|
||||
|
||||
static const char *SIGNATURE_ELECTRUM = "$electrum$5*";
|
||||
|
||||
#define M21800_MAX_ACCEL 1
|
||||
#define M21800_MAX_THREADS 8
|
||||
|
||||
u32 module_kernel_accel_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
|
||||
{
|
||||
const u32 kernel_accel_max = (user_options->kernel_accel_chgd == true) ? user_options->kernel_accel : M21800_MAX_ACCEL;
|
||||
|
||||
return kernel_accel_max;
|
||||
}
|
||||
|
||||
u32 module_kernel_threads_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
|
||||
{
|
||||
const u32 kernel_threads_max = (user_options->kernel_threads_chgd == true) ? user_options->kernel_threads : M21800_MAX_THREADS;
|
||||
|
||||
return kernel_threads_max;
|
||||
}
|
||||
|
||||
void module_hook23 (hc_device_param_t *device_param, const void *hook_salts_buf, const u32 salt_pos, const u64 pw_pos)
|
||||
{
|
||||
electrum_hook_t *hook_items = (electrum_hook_t *) device_param->hooks_buf;
|
||||
@ -499,11 +516,11 @@ void module_init (module_ctx_t *module_ctx)
|
||||
module_ctx->module_hook_size = module_hook_size;
|
||||
module_ctx->module_jit_build_options = module_jit_build_options;
|
||||
module_ctx->module_jit_cache_disable = MODULE_DEFAULT;
|
||||
module_ctx->module_kernel_accel_max = MODULE_DEFAULT;
|
||||
module_ctx->module_kernel_accel_max = module_kernel_accel_max;
|
||||
module_ctx->module_kernel_accel_min = MODULE_DEFAULT;
|
||||
module_ctx->module_kernel_loops_max = MODULE_DEFAULT;
|
||||
module_ctx->module_kernel_loops_min = MODULE_DEFAULT;
|
||||
module_ctx->module_kernel_threads_max = MODULE_DEFAULT;
|
||||
module_ctx->module_kernel_threads_max = module_kernel_threads_max;
|
||||
module_ctx->module_kernel_threads_min = MODULE_DEFAULT;
|
||||
module_ctx->module_kern_type = module_kern_type;
|
||||
module_ctx->module_kern_type_dynamic = MODULE_DEFAULT;
|
||||
|
Loading…
Reference in New Issue
Block a user