Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MinPasswordLength = 9 MaxPasswordLength = 72 // ErrPasswordTooShort ... ErrPasswordTooShort = fmt.Errorf( "Password must be at least %d characters long", MinPasswordLength, ) // ErrPasswordTooLong ... ErrPasswordTooLong = fmt.Errorf( "Password must be at maximum %d characters long", MaxPasswordLength, ) // ErrPasswordTooWeak ... ErrPasswordTooWeak = errors.New("Password is too weak") )
Functions ¶
func HashPassword ¶
HashPassword creates a bcrypt password hash
func HashWpPassword ¶ added in v1.0.5
HashWpPassword creates a phpass password hash
func ValidatePassword ¶ added in v1.0.8
ValidatePassword
func VerifyPassword ¶
VerifyPassword compares password and the hashed password Fallback to phpass if bcrypt fails
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.