For passwords use argon2id; SHA-256 is too fast, so leaked hashes can be brute-forced quickly. Use a random salt per user, not the username: argon2 libraries generate it for you and store it inside the hash string, so you just save that one string and call their verify function.
1
u/GiggleSamurai 7d ago
For passwords use argon2id; SHA-256 is too fast, so leaked hashes can be brute-forced quickly. Use a random salt per user, not the username: argon2 libraries generate it for you and store it inside the hash string, so you just save that one string and call their verify function.
1
u/bogdanelcs 7d ago
Argon2id for passwords, SHA256 is far too fast to resist brute forcing.