Diceware

Hex.pm

An Elixir library to generate passphrases using the Diceware method.

Installation

Add diceware to your list of dependencies in mix.exs:

def deps do
  [
    {:diceware, "~> x.x.x"}
  ]
end

Usage

Ask for a new password and get a Diceware.Passphrase back

generated = Dicware.generate()
IO.inspect(generated.phrase)

will output something like aliveallenhairmousyvault5555

You can also specify how many words to use when building the passphrase

generated = Diceware.generate(count: 10)
IO.inspect(generated.phrase)

will output a generated phrase made out of 10 words, like barrebeastcrissethanfrancmabelswigswineuz57th

Official docs available on hex.pm