Documentation
¶
Index ¶
Constants ¶
View Source
const ( PasswordCountMin = 1 // Fewest allowed passwords to generate. PasswordCountMax = 1024 // Most allowed passwords to generate. PasswordCountDefault = 1 // Default number of passwords to generate. PasswordLengthMin = 5 // Shortest allowed password to generate. PasswordLengthMax = 1024 // Longest allowed password to generate. PasswordLengthDefault = 16 // Default length of password to generate. AlphabetLengthMin = 2 // Smallest allowed alphabet. AlphabetLower = "abcdefghijkmnopqrstuvwxyz" // Lowercase English letters, ambiguous characters removed. AlphabetLowerAmbiguous = "l" + AlphabetLower // Lowercase English letters. AlphabetUpper = "ABCDEFGHJKLMNPQRSTUVWXYZ" // Uppercase English letters, ambiguous characters removed. AlphabetUpperAmbiguous = "IO" + AlphabetUpper // Uppercase English letters. AlphabetNumeric = "23456789" // Arabic numerals, ambiguous characters removed. AlphabetNumericAmbiguous = "01" + AlphabetNumeric // Arabic numerals. AlphabetSpecial = "!@#$%^&*_-+=" // Selection of special characters. AlphabetDefault = AlphabetLower + AlphabetUpper + AlphabetNumeric // Alphanumeric English characters, ambiguous characters removed. AlphabetDefaultAmbiguous = AlphabetLowerAmbiguous + AlphabetUpperAmbiguous + AlphabetNumericAmbiguous PassphraseCountMin = 1 // Fewest allowed passphrases to generate. PassphraseCountMax = 1024 // Most allowed passphrases to generate. PassphraseCountDefault = 1 // Default number of passphrases to generate. PassphraseWordCountMin = 3 // Shortest word-length allowed for passphrase generation. PassphraseWordCountMax = 64 // Longest word-length allowed for passphrase generation. PassphraseWordCountDefault = 6 // Default word-length for passphrase generation. PassphraseSeparatorSpace = ' ' PassphraseSeparatorDash = '-' PassphraseSeparatorUnderscore = '_' PassphraseSeparatorDot = '.' PassphraseSeparatorColon = '.' PassphraseSeparatorDefault = PassphraseSeparatorSpace // Default passphrase word separator. PassphraseCasingLower = iota // All lowercase passphrase output. PassphraseCasingUpper // All uppercase passphrase output. PassphraseCasingTitle // Title casing for each passphrase word. PassphraseCasingNone // No casing transformation is applied to the provided word list. PassphraseCasingDefault = PassphraseCasingNone WordListLengthMin = 2 )
Helpful defaults, limits, and options for configuring package function calls.
Variables ¶
View Source
var ( // WordListDefault is a set of words from EFF for use with their passphrase dice method of // deriving passphrases. // See: https://www.eff.org/dice WordListDefault = []string{}/* 7776 elements not displayed */ )
Functions ¶
func GeneratePassphrases ¶
func GeneratePassphrases( count uint, wordCount uint, separator rune, casing PassphraseCasing, wordList []string, ) ( passphrases []string, err error, )
GeneratePassphrases generates random passphrases based on the configuration provided by the user.
Types ¶
type PassphraseCasing ¶
type PassphraseCasing uint8
PassphraseCasing represents the casing of each word within a passphrase.
Click to show internal directories.
Click to hide internal directories.