Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPassword ¶
CheckPassword is a boolean wrapper for VerifyPassword.
func HashPassword ¶
HashPassword generates a bcrypt hash for the given password. - Uses bcrypt.MinCost / DefaultCost / MaxCost to bound the cost and avoid magic numbers. - When cost < MinCost, falls back to DefaultCost; when cost > MaxCost, caps at MaxCost.
func VerifyPassword ¶
VerifyPassword compares a bcrypt hash with a plaintext password. - Returns nil if they match; returns an error if they do not match or hash is invalid.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.