Documentation ¶
Index ¶
- func CheckPasswordHash(password, hash string) bool
- func ComputeHmac(hashFunc func() hash.Hash, message string, secret string) string
- func GenerateSecretKey(numBytes int) (string, error)
- func HashPassword(password string) (string, error)
- func ValidateHmacSignature(hashFunc func() hash.Hash, payload string, secret string, hexDigest string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
CheckPasswordHash if the hash (usually stored in database) matches users entered password
func ComputeHmac ¶
func GenerateSecretKey ¶
GenerateSecretKey generated n-byte secret key and returns in hex format string
func HashPassword ¶
HashPassword - stronger encryption for storing passwords
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.