Skip to content

Commit

Permalink
Fix pw print.
Browse files Browse the repository at this point in the history
  • Loading branch information
iegomez committed May 21, 2020
1 parent 2361cac commit 8f7c97a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pw-gen/pw.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func main() {

const(
const (
sha256Size = 32
sha512Size = 64
)
Expand All @@ -27,11 +27,13 @@ func main() {
shaSize := *keylen
if shaSize == 0 {
switch *algorithm {
case "sha265": shaSize = sha256Size
case "sha512": shaSize = sha512Size
default:
fmt.Printf("Invalid password hash algorithm", *algorithm)
return
case "sha265":
shaSize = sha256Size
case "sha512":
shaSize = sha512Size
default:
fmt.Println("Invalid password hash algorithm:", *algorithm)
return
}
}

Expand Down

0 comments on commit 8f7c97a

Please sign in to comment.