xkcdpwgen

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2022 License: MIT Imports: 7 Imported by: 37

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

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

Generator encapsulates the password generator configuration

func NewGenerator

func NewGenerator() *Generator

NewGenerator returns a new password generator with default values set

func (*Generator) GeneratePassword

func (g *Generator) GeneratePassword() []byte

GeneratePassword creates a randomized password returned as byte slice

func (*Generator) GeneratePasswordString

func (g *Generator) GeneratePasswordString() string

GeneratePasswordString creates a randomized password returned as string

func (*Generator) SetCapitalize

func (g *Generator) SetCapitalize(capitalize bool)

SetCapitalize turns on/off capitalization of the first character

func (*Generator) SetDelimiter

func (g *Generator) SetDelimiter(delimiter string)

SetDelimiter sets the delimiter string. Can also be set to an empty string.

func (*Generator) SetNumWords

func (g *Generator) SetNumWords(count int)

SetNumWords sets the word count for the generator

func (*Generator) UseCustomWordlist

func (g *Generator) UseCustomWordlist(wl []string)

UseCustomWordlist sets the wordlist to the wl provided one

func (*Generator) UseLangWordlist

func (g *Generator) UseLangWordlist(lang string) error

UseLangWordlist sets wordlist matching to provided lang string

func (*Generator) UseWordlistEFFLarge

func (g *Generator) UseWordlistEFFLarge()

UseWordlistEFFLarge sets the wordlist from which the passwords are generated to eff_large (https://www.eff.org/de/deeplinks/2016/07/new-wordlists-random-passphrases)

func (*Generator) UseWordlistEFFShort

func (g *Generator) UseWordlistEFFShort()

UseWordlistEFFShort sets the wordlist from which the passwords are generated to eff_short (https://www.eff.org/de/deeplinks/2016/07/new-wordlists-random-passphrases)

Jump to

Keyboard shortcuts

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