Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PasswordStrength ¶
type PasswordStrength int
PasswordStrength 定义密码强度类型
const ( // 非常弱:长度小于 6 VeryWeak PasswordStrength = iota + 1 // 弱:长度小于 8 或字符类型少于 2 种 Weak // 中等:长度小于 10 或字符类型少于 3 种 Medium // 强:长度大于等于 10 且字符类型至少 3 种 Strong )
定义密码强度等级常量
func CheckPasswordStrength ¶
func CheckPasswordStrength(password string) PasswordStrength
CheckPasswordStrength 检查密码强度,返回 1 - 4 的等级
Source Files
¶
- checkpassword.go
Click to show internal directories.
Click to hide internal directories.