invitation codes: tweak argon2 params to consume less memory
This commit is contained in:
parent
9917429da3
commit
e13e832abe
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
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"), 2, 64*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_id = hex.EncodeToString(id_hash[:8])
|
||||||
code_pw = hex.EncodeToString(pw_hash[:16])
|
code_pw = hex.EncodeToString(pw_hash[:16])
|
||||||
|
|
Loading…
Reference in a new issue