Mirror of
forum.nim-lang.org
index
7815 :: hashing stored passwords
[2021-04-18T03:15:51+02:00]
View Orginal
sdmcallister
(orginal)
[2021-04-18T03:15:51+02:00]
view original
Are there any packages that can be used to hash stored passwords that works on linux and windows?
marcomq
(orginal)
[2021-04-18T10:06:05+02:00]
view original
I haven't found argon2 for nim yet. Also, I didn't tested it yet, but you may use PBKDF2 to store passwords.
https://github.com/cheatfate/nimcrypto/blob/a065c1741836462762d18d2fced1fedd46095b02/nimcrypto/pbkdf2.nim
Make sure to have a high number of iterations (
>
300000) as specialized hardware can generate these very fast nowadays.
cheatfate
(orginal)
[2021-04-18T10:49:04+02:00]
view original
nimcrypto has
pbkdf2
and
scrypt
kdfs.
jackhftang
(orginal)
[2021-04-18T11:06:56+02:00]
view original
argon2 is available in libsodium. Look for
crypto_pwhash_argon2id
.
federico3
(orginal)
[2021-04-18T18:40:13+02:00]
view original
https://github.com/FedericoCeratto/nim-httpauth
uses password hashing from libsodium as well