randkey

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: Unlicense Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenPassword

func GenPassword(src []string, counts []int) (pass string)

func GeneratePassword

func GeneratePassword(counts ...int) (pass string)

func NumberLower

func NumberLower(count int) (code string)

NumberLower 数字和小写字母

func NumberPass

func NumberPass(count int) (code string)

NumberPass 数字和大写字母、特殊字符

func NumberUpper

func NumberUpper(count int) (code string)

NumberUpper 数字和大写字母

func NumbersOnly

func NumbersOnly(count int) (code string)

NumbersOnly 只返回数字

Types

type PasswordValid

type PasswordValid string

PasswordValid hash验证密码

func NewPasswordValid

func NewPasswordValid(key string) (p *PasswordValid)

NewPasswordValid 构造一个新的验证器

func (*PasswordValid) Encode

func (p *PasswordValid) Encode(password string) (enc string)

Encode 加密密码

func (*PasswordValid) Valid

func (p *PasswordValid) Valid(originPassword, password string) (ok bool)

Valid 验证是否一致

Jump to

Keyboard shortcuts

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