Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparePassword ¶
ComparePassword compares the plain text password and the hash and returns true if they're equal or false otherwise.
func GenRandomString ¶
GenRandomString generates a random string with length n for a fixed alphabet.
func HashPassword ¶
HashPassword returns a bcrypt encoded password hash. The password is hashed using SHA256 first to limit its length.
func SHA256Base64 ¶
SHA256Base64 hashes a string to SHA256 and encodes it to base64. It panics on error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.