Diceware (diceware v0.2.2)
A library that generates a Diceware passphrase.
A diceware passphrase builds a readable passphrase of 6 (or more) words from a list of 8,192 words.
Creating a passphrase combining readable words helps the user more easily memorize it.
Link to this section Summary
Functions
Generate a passphrase with at least 6 words.
Return a string of the password with ANSI colors for printing to the console
Link to this section Functions
Link to this function
generate(opts \\ [])
Specs
generate(Keyword.t()) :: Diceware.Passphrase.t()
Generate a passphrase with at least 6 words.
Takes a keyword list of options:
:count
- number of words in pharase, defaults to 6
Link to this function
with_colors(passphrase)
Specs
with_colors(Diceware.Passphrase.t()) :: String.t()
Return a string of the password with ANSI colors for printing to the console
Examples
iex> passphrase = Diceware.Passphrase.new(["a", "b", "c"])
iex> Diceware.with_colors(passphrase)
"\e[36ma\e[35mb\e[33mc"