Fix pw keylen/shasize use.

This commit is contained in:
Ignacio Gómez 2020-07-21 21:40:06 -04:00
parent 7dd3f5a895
commit 81b60ac724
No known key found for this signature in database
GPG Key ID: 15A77C6BEC604B06
1 changed files with 2 additions and 2 deletions

View File

@ -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