Documentation ¶
Index ¶
Constants ¶
View Source
const (
// Cost is the cost used to hash passwords.
Cost = 10
)
Variables ¶
View Source
var ( // ErrInvalidCredentials is returned when the credentials provided are invalid. ErrInvalidCredentials = errors.New("invalid credentials") )
Functions ¶
func CheckPassword ¶
CheckPassword checks if a password matches a hash with bcrypt.
func HashPassword ¶
HashPassword hashes a password with bcrypt and the default cost of 10.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.