Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
func HashPassword ¶
For backward compatibility, keep the package-level functions
Types ¶
type PasswordHasher ¶
type PasswordHasher struct{}
PasswordHasher handles password hashing operations
func NewPasswordHasher ¶
func NewPasswordHasher() *PasswordHasher
NewPasswordHasher creates a new PasswordHasher
func (*PasswordHasher) CheckPasswordHash ¶
func (p *PasswordHasher) CheckPasswordHash(password, hash string) bool
CheckPasswordHash compares a bcrypt hashed password with its possible plaintext equivalent
func (*PasswordHasher) HashPassword ¶
func (p *PasswordHasher) HashPassword(password string) (string, error)
HashPassword creates a bcrypt hash of the password
Click to show internal directories.
Click to hide internal directories.