aboutsummaryrefslogtreecommitdiffstats
path: root/pwhash.go
diff options
context:
space:
mode:
Diffstat (limited to 'pwhash.go')
-rw-r--r--pwhash.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pwhash.go b/pwhash.go
index dabafa7..f1c285d 100644
--- a/pwhash.go
+++ b/pwhash.go
@@ -7,10 +7,10 @@ import (
"golang.org/x/term"
)
-const defaultArgon2Memory = 64 * 1024
+var argon2Memory = 64 * 1024
-func hashPassword(password string, salt []byte, memory int) ([]byte, error) {
- return argon2.IDKey([]byte(password), salt, 1, uint32(memory), 4, 32), nil
+func hashPassword(password string, salt []byte) []byte {
+ return argon2.IDKey([]byte(password), salt, 1, uint32(argon2Memory), 4, 32)
}
func termReadPassword() (string, error) {