Documentation
¶
Index ¶
Constants ¶
View Source
const ( PG_SPEC_CHAR int32 = 1 << iota PG_NUMBER PG_SEPARATOR PG_WORD // Only the last word is given this value PG_LAST_WORD // TODO: Add a bitmask representing the lengths of each word PG_WORD_LENGTH )
Phrase modifiers
View Source
const (
FILE_NAME = "./newwords.txt"
)
Variables ¶
This section is empty.
Functions ¶
func CryptoShuffle ¶
CryptoShuffle is an implementation of the Fisher-Yates shuffle
func NewPassword ¶
func NewWithEntropy ¶
NewWithEntropy returns a new passphrase as well as a float32 containing the total entropy of the generated phrase.
Types ¶
type Options ¶
type Options struct { // Specify the desired maximum length of any single word. // Shorter words are easier to remember. Default word list // has a cap of 15 MaxWordLength int // Desired Length of the phrase. PhraseLength int // Minimum number of special characters to // include in a generated phrase. SpecialChars int // Minimum number of numbers to include // in a generated phrase. Numbers int // Whether the letter case should be changed // in a generated phrase ChangeCase bool // The separator to separate different words. // // If no separator is desired enter "" for the value. Separator string }
Click to show internal directories.
Click to hide internal directories.