checkpassword

package
v0.0.0-...-865ae18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2025 License: MIT Imports: 1 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL