Documentation
¶
Index ¶
Constants ¶
View Source
const ( // VeryWeak password VeryWeak = 0 // Weak password Weak = 1 // Fair password Fair = 2 // Strong password Strong = 3 // VeryStrong password VeryStrong = 4 // OK password is the recommended minimum strength for API calls OK = Fair )
Variables ¶
Functions ¶
func IsValid ¶
IsValid returns nil if password is a reasonable length and has strength greater than or equal to [minimumStrength]
func SufficientlyStrong ¶
SufficientlyStrong returns true if password has strength greater than or equal to [minimumStrength], scored by zxcvbn. This is the only implementation: a build tag must not decide how strong a password has to be.
Types ¶
Click to show internal directories.
Click to hide internal directories.