aboutsummaryrefslogtreecommitdiffstats
path: root/pwhash.go
diff options
context:
space:
mode:
authorRose Hogenson <rosehogenson@posteo.net>2025-10-24 16:37:31 -0700
committerRose Hogenson <rosehogenson@posteo.net>2025-10-24 16:37:31 -0700
commit0cd822566776eddf8e47e61b7279aff4fa5481d7 (patch)
treecced0871ee0af562324933795032af1f9eefb4da /pwhash.go
parent466cbd5a1be7d274a45506add79c21e06ee53381 (diff)
downloadsym-0cd822566776eddf8e47e61b7279aff4fa5481d7.tar.zst
Get rid of defaultOptions
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) {