Get rid of truecrypt_keyfiles and veracrypt_keyfiles variable in main

pull/518/head
jsteube 8 years ago
parent d4e666d955
commit 80685d94c4

@ -1638,7 +1638,7 @@ int hashconfig_init (hashconfig_t *hashconfig, const user_optio
void hashconfig_destroy (hashconfig_t *hashconfig);
uint hashconfig_general_pw_min (hashconfig_t *hashconfig);
uint hashconfig_general_pw_max (hashconfig_t *hashconfig);
void hashconfig_general_defaults (hashconfig_t *hashconfig, hashes_t *hashes, char *optional_param1);
void hashconfig_general_defaults (hashconfig_t *hashconfig, hashes_t *hashes, const user_options_t *user_options);
void hashconfig_benchmark_defaults (hashconfig_t *hashconfig, salt_t *salt, void *esalt);
char *hashconfig_benchmark_mask (hashconfig_t *hashconfig);

@ -400,14 +400,8 @@ int main (int argc, char **argv)
// temporarily start
char *truecrypt_keyfiles = NULL;
char *veracrypt_keyfiles = NULL;
if (1)
{
truecrypt_keyfiles = user_options->truecrypt_keyfiles;
veracrypt_keyfiles = user_options->veracrypt_keyfiles;
data.attack_mode = user_options->attack_mode;
data.restore = user_options->restore;
data.restore_timer = user_options->restore_timer;
@ -956,12 +950,7 @@ int main (int argc, char **argv)
* Automatic Optimizers
*/
char *optional_param1 = NULL;
if (truecrypt_keyfiles) optional_param1 = truecrypt_keyfiles;
if (veracrypt_keyfiles) optional_param1 = veracrypt_keyfiles;
hashconfig_general_defaults (hashconfig, hashes, optional_param1);
hashconfig_general_defaults (hashconfig, hashes, user_options);
if (hashes->salts_cnt == 1)
hashconfig->opti_type |= OPTI_TYPE_SINGLE_SALT;

@ -20009,7 +20009,7 @@ uint hashconfig_general_pw_max (hashconfig_t *hashconfig)
return pw_max;
}
void hashconfig_general_defaults (hashconfig_t *hashconfig, hashes_t *hashes, char *optional_param1)
void hashconfig_general_defaults (hashconfig_t *hashconfig, hashes_t *hashes, const user_options_t *user_options)
{
salt_t *salts_buf = hashes->salts_buf;
void *esalts_buf = hashes->esalts_buf;
@ -20055,6 +20055,11 @@ void hashconfig_general_defaults (hashconfig_t *hashconfig, hashes_t *hashes, ch
}
}
char *optional_param1 = NULL;
if (user_options->truecrypt_keyfiles) optional_param1 = user_options->truecrypt_keyfiles;
if (user_options->veracrypt_keyfiles) optional_param1 = user_options->veracrypt_keyfiles;
if (optional_param1)
{
char *tcvc_keyfiles = (char *) optional_param1;

@ -356,7 +356,7 @@ int user_options_parse (user_options_t *user_options, int myargc, char **myargv)
if (user_options->segment_size_chgd == true)
{
user_options->segment_size = user_options->segment_size * (1024 * 1024);
user_options->segment_size *= (1024 * 1024);
}
return 0;

Loading…
Cancel
Save