Go back to at least one minimum and maximum of password and salt length

pull/1928/head
jsteube 5 years ago
parent 568336d35f
commit a1b72fc93a

@ -346,7 +346,7 @@ sub init_db_word_rand
my @pool;
for (my $len = $len_min; $len <= $len_max; $len++)
for (my $len = $len_min + 1; $len <= $len_max - 1; $len++)
{
push @pool, $len;
}
@ -357,6 +357,9 @@ sub init_db_word_rand
my $idx = 0;
$db_out->[$idx++] = $len_min;
$db_out->[$idx++] = $len_max;
for ($idx .. $outputs)
{
$db_out->[$idx++] = shift @pool;
@ -392,7 +395,7 @@ sub init_db_salt_rand
my @pool;
for (my $len = $len_min; $len <= $len_max; $len++)
for (my $len = $len_min + 1; $len <= $len_max - 1; $len++)
{
push @pool, $len;
}
@ -403,6 +406,9 @@ sub init_db_salt_rand
my $idx = 0;
$db_out->[$idx++] = $len_min;
$db_out->[$idx++] = $len_max;
for ($idx .. $outputs)
{
$db_out->[$idx++] = shift @pool;

Loading…
Cancel
Save