Hashing
Last updated
Last updated
This page contains recommendations for choosing a hashing algorithm.
If you need to hash passwords see the the Authentication: Password Storage page.
For other data, use a hashing algorithm from the SHA-2
or SHA-3
family.
Do not use vulnerable hashing algorithms from the list below. You can find examples of collision attacks at https://github.com/corkami/collisions.
Use the implementation of hash algorithms from the crypto package, such as crypto/sha256 or crypto/sha512. You can find the whole list at https://pkg.go.dev/crypto#Hash