Documentation
¶
Index ¶
Constants ¶
const ( MinLength = 5 MaxLength = 128 MinWords = 3 MaxWords = 20 )
Bounds of the rules.
Variables ¶
var ( ErrLength = errors.New("password length out of range") ErrWords = errors.New("passphrase word count out of range") ErrNoCharset = errors.New("no character set selected") ErrCharset = errors.New("unknown character set") )
Rule errors.
Functions ¶
This section is empty.
Types ¶
type Charsets ¶
type Charsets struct {
// contains filtered or unexported fields
}
Charsets is a non-empty set of character classes; the zero value holds every class.
func NewCharsets ¶
NewCharsets is the set of cs, which must name at least one class.
type Length ¶
type Length struct {
// contains filtered or unexported fields
}
Length is a password length within [MinLength, MaxLength]; the zero value is MinLength.
type Passphrase ¶
Passphrase is the rules of a passphrase of words from the EFF large wordlist, joined by Separator, each capitalised when Capitalize is set, one of them followed by a digit when Number is set.
type Password ¶
Password is the rules of a random-character password: every class in Charsets appears at least once.