From a1b72fc93a0dfaa795460f163d0f57024e61a64c Mon Sep 17 00:00:00 2001 From: jsteube Date: Wed, 20 Feb 2019 13:03:21 +0100 Subject: [PATCH] Go back to at least one minimum and maximum of password and salt length --- tools/test.pl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/test.pl b/tools/test.pl index c121d1580..60bb8fa72 100755 --- a/tools/test.pl +++ b/tools/test.pl @@ -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;