Skip to content

Commit

Permalink
Fix pw keylen/shasize use.
Browse files Browse the repository at this point in the history
  • Loading branch information
iegomez committed Jul 22, 2020
1 parent 7dd3f5a commit 81b60ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pw-gen/pw.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 81b60ac

Please sign in to comment.