Documentation ¶
Overview ¶
Package passphrase generates easy-to-remember passwords from random words.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Wordlists = map[string][]string{}
Wordlists contains all wordlists grouped by language. Each new language file add a wordlist to this map with the corresponding two-letter language code as key.
Functions ¶
Types ¶
type Generator ¶
type Generator struct { // Wordlist must be a list of words from which the passphrases are // generated. It can be set directly, i.e. to the output of ReadFile(). // Or it can be set indirectly via the Language field (see below). Wordlist []string // Language allows to set Wordlist to a build-in wordlist, which must // be present in Wordlists. // The Language setting gets ignored when Wordlist has already been set // to a non-empty value. Language string // Words determines the number of words per passphrase. Words int // Separator is the string between the words that joins all words // together. It is usually a single character or an empty string. Separator string // Capitalize converts the first letter of each word to an uppercase // letter when set to true. Capitalize bool // Digits determines the number of digits per passphrase. Digits int }
Generator generates random passphrases by the given settings.
Click to show internal directories.
Click to hide internal directories.