summaryrefslogtreecommitdiffstats
path: root/cmd/hashpw
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/hashpw')
-rw-r--r--cmd/hashpw/hashpw.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/hashpw/hashpw.go b/cmd/hashpw/hashpw.go
index 6a84fc5..5bc740d 100644
--- a/cmd/hashpw/hashpw.go
+++ b/cmd/hashpw/hashpw.go
@@ -16,13 +16,13 @@ func run() error {
if err != nil {
return err
}
- salt := make([]byte, 32)
+ salt := make([]byte, pwhash.SaltLen)
rand.Read(salt)
_, hashedPassword, err := pwhash.Hash(string(password), salt)
if err != nil {
return err
}
- fmt.Printf("notepad-password=%x\nsalt=%x\n", hashedPassword, salt)
+ fmt.Printf("notepad-password=%x%x\n", salt, hashedPassword)
return nil
}