pwgen

package module
v0.0.0-...-5997872 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: MIT Imports: 6 Imported by: 0

README

pwgen

Password generator

Documentation

Index

Constants

View Source
const (
	//最小字符限制
	CHAR_NUM_LOW_LIMIT  = 4
	CHAR_NUM_HIGH_LIMIT = 64
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PWBuilder

type PWBuilder struct {
	//@CharNum 字符数目
	CharNum int
	//@Upper  true包含大写字母
	Upper bool
	//@Lower  true包含小写字母
	Lower bool
	//@SpSymbol true包含特殊符号
	SpSymbol bool
	//@Digit true包含数字
	Digit bool
}

PWBuilder包含密码要求

func Builder

func Builder() *PWBuilder

返回默认builder

func (*PWBuilder) AddDigit

func (b *PWBuilder) AddDigit() *PWBuilder

func (*PWBuilder) AddLower

func (b *PWBuilder) AddLower() *PWBuilder

func (*PWBuilder) AddSpSymbol

func (b *PWBuilder) AddSpSymbol() *PWBuilder

func (*PWBuilder) AddUpper

func (b *PWBuilder) AddUpper() *PWBuilder

Builder属性设置

func (*PWBuilder) DelDigit

func (b *PWBuilder) DelDigit() *PWBuilder

func (*PWBuilder) DelLower

func (b *PWBuilder) DelLower() *PWBuilder

func (*PWBuilder) DelSpSymbol

func (b *PWBuilder) DelSpSymbol() *PWBuilder

func (*PWBuilder) DelUpper

func (b *PWBuilder) DelUpper() *PWBuilder

func (*PWBuilder) Gen

func (b *PWBuilder) Gen(password string) string

Gen生成符合要求的密码

func (*PWBuilder) SetCharNum

func (b *PWBuilder) SetCharNum(num int) *PWBuilder

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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