Documentation
¶
Index ¶
- type Generator
- func (g *Generator) GeneratePassword() []byte
- func (g *Generator) GeneratePasswordString() string
- func (g *Generator) SetCapitalize(capitalize bool)
- func (g *Generator) SetDelimiter(delimiter string)
- func (g *Generator) SetNumWords(count int)
- func (g *Generator) UseCustomWordlist(wl []string)
- func (g *Generator) UseLangWordlist(lang string) error
- func (g *Generator) UseWordlistEFFLarge()
- func (g *Generator) UseWordlistEFFShort()
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 ¶
GeneratePassword creates a randomized password returned as byte slice
func (*Generator) GeneratePasswordString ¶
GeneratePasswordString creates a randomized password returned as string
func (*Generator) SetCapitalize ¶
SetCapitalize turns on/off capitalization of the first character
func (*Generator) SetDelimiter ¶
SetDelimiter sets the delimiter string. Can also be set to an empty string.
func (*Generator) SetNumWords ¶
SetNumWords sets the word count for the generator
func (*Generator) UseCustomWordlist ¶
UseCustomWordlist sets the wordlist to the wl provided one
func (*Generator) UseLangWordlist ¶
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)