Diceware (diceware v0.2.9)
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
Dncodes a string to a Diceware.Passphrase
provided it was encoded with encode/1
Base64 encodes the given Diceware.Passphrase
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
decode(passphrase)
Specs
decode(String.t()) :: Diceware.Passphrase.t()
Dncodes a string to a Diceware.Passphrase
provided it was encoded with encode/1
encode(passphrase)
Specs
encode(Diceware.Passphrase.t()) :: String.t()
Base64 encodes the given Diceware.Passphrase
This DOES NOT provide encryption, but can be passed through a standard string encryption tool like GPG.
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 phrase, defaults to 6
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"