genpas

package
v0.0.0-...-02ed52f Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultParams = Params{
	Upper:   true,
	Lower:   true,
	Digits:  true,
	Special: true,

	ExcludeSimilar: true,
	HasEveryGroup:  true,
}

Functions

This section is empty.

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Password Generator

func NewGenerator

func NewGenerator(p Params, r *Random) (*Generator, error)

func (*Generator) Generate

func (g *Generator) Generate(n int) string

type Params

type Params struct {
	Upper   bool // [A..Z]
	Lower   bool // [a..z]
	Digits  bool // [0..9]
	Special bool // Special Symbols

	ExcludeSimilar bool // Exclude similar symbols: (0,O,o) and (l,I,i,1)
	HasEveryGroup  bool // AllSetGroups - All marked groups
}

type Random

type Random struct {
	// contains filtered or unexported fields
}

func NewRandom

func NewRandom() *Random

func NewRandomReader

func NewRandomReader(source io.Reader) *Random

func (*Random) IntRange

func (r *Random) IntRange(min, max int) int

pseudo random number [min, max)

func (*Random) Intn

func (r *Random) Intn(n int) int

pseudo random number [0, n)

func (*Random) Uint32

func (r *Random) Uint32() uint32

func (*Random) Uint32n

func (r *Random) Uint32n(n uint32) uint32

func (*Random) Uint64

func (r *Random) Uint64() uint64

func (*Random) Uint64n

func (r *Random) Uint64n(n uint64) uint64

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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