From 81b60ac7248d66e9adf43810cc015906aafd167a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ignacio=20G=C3=B3mez?= Date: Tue, 21 Jul 2020 21:40:06 -0400 Subject: [PATCH] Fix pw keylen/shasize use. --- pw-gen/pw.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pw-gen/pw.go b/pw-gen/pw.go index 25bb69d..90bed19 100644 --- a/pw-gen/pw.go +++ b/pw-gen/pw.go @@ -40,11 +40,11 @@ func main() { switch *hasher { case hashing.Argon2IDOpt: - hashComparer = hashing.NewArgon2IDHasher(*saltSize, *iterations, *keylen, uint32(*memory), uint8(*parallelism)) + hashComparer = hashing.NewArgon2IDHasher(*saltSize, *iterations, shaSize, uint32(*memory), uint8(*parallelism)) case hashing.BcryptOpt: hashComparer = hashing.NewBcryptHashComparer(*cost) case hashing.Pbkdf2Opt: - hashComparer = hashing.NewPBKDF2Hasher(*saltSize, *iterations, *algorithm, *saltEncoding, *keylen) + hashComparer = hashing.NewPBKDF2Hasher(*saltSize, *iterations, *algorithm, *saltEncoding, shaSize) default: fmt.Println("invalid hasher option: ", *hasher) return