aboutsummaryrefslogtreecommitdiff
path: root/invite.go
diff options
context:
space:
mode:
authorArmaël Guéneau <armael.gueneau@ens-lyon.org>2024-11-11 20:04:35 +0100
committerArmaël Guéneau <armael.gueneau@ens-lyon.org>2024-11-11 20:04:35 +0100
commite13e832abeb2cbae28735e38037b2fc7006b3008 (patch)
tree9958caf103632c000c6027e822f48e725bf646a5 /invite.go
parent9917429da3b06462969b41d511ad4daf27eaf197 (diff)
downloadguichet-tweak-argon2-params.tar.gz
guichet-tweak-argon2-params.zip
invitation codes: tweak argon2 params to consume less memorytweak-argon2-params
Diffstat (limited to 'invite.go')
-rw-r--r--invite.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/invite.go b/invite.go
index 060947a..24e5fbe 100644
--- a/invite.go
+++ b/invite.go
@@ -350,8 +350,8 @@ func readCode(code string) (code_id string, code_pw string) {
}
}
- id_hash := argon2.IDKey([]byte(code_digits), []byte("Guichet ID"), 2, 64*1024, 4, 32)
- pw_hash := argon2.IDKey([]byte(code_digits), []byte("Guichet PW"), 2, 64*1024, 4, 32)
+ id_hash := argon2.IDKey([]byte(code_digits), []byte("Guichet ID"), 3, 40*1024, 4, 32)
+ pw_hash := argon2.IDKey([]byte(code_digits), []byte("Guichet PW"), 3, 40*1024, 4, 32)
code_id = hex.EncodeToString(id_hash[:8])
code_pw = hex.EncodeToString(pw_hash[:16])