Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCompareFailed = errors.New("verify compare failed")
ErrCompareFailed compare failed
Functions ¶
func IsComplexEnough ¶
IsComplexEnough return True if password meets complexity settings
func SetupComplexity ¶
func SetupComplexity(values []string)
SetupComplexity setup complexity with values value can set lower,upper,digit,spec default use lower, upper and digit to generate a random password, and not meets complexity.
Types ¶
type BCrypt ¶
type BCrypt struct {
// contains filtered or unexported fields
}
BCrypt bcrypt password encryption
func NewBCrypt ¶
NewBCrypt new bcrypt password encryption with key,if key empty use defaultPrivateKey.
Click to show internal directories.
Click to hide internal directories.