cryptopasta
cryptopasta copied to clipboard
HashPassword naming confuses people
I recommend NewPasswordHash. Its documentation should state:
- This command returns a different hash each call for the same password.
- Use CheckPasswordHash to verify a password matches the hash.
Agreed, NewPasswordHash is way better.
To avoid breaking compatibility just leave the old name in, calling the new one, and mark it with the godoc deprecated annotation to hide it.