From 0cd822566776eddf8e47e61b7279aff4fa5481d7 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Fri, 24 Oct 2025 16:37:31 -0700 Subject: Get rid of defaultOptions --- pwhash.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pwhash.go') 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) { -- cgit v1.3.1