# `XKPassword`
[🔗](https://github.com/ziyan-junaideen/ex_xkpassword/blob/main/lib/xk_password.ex#L1)

Generates memorable passwords from the dictionary bundled with the Ruby gem.

Each word is drawn independently by choosing a length and then a word of that
length. The default preset, :xkcd, produces four hyphen-separated words.

# `generate`

```elixir
@spec generate(keyword() | map() | nil) :: String.t()
```

Generates one password from a keyword list or an atom-keyed map of options.

The options are :preset, :words, :min_length, :max_length, :separator, and
:case_transform. Explicit options override the preset. Preset names and case
transforms may also be given as strings.

The case transforms are :upcase, :downcase, and :capitalize. Use nil to choose
lowercase or uppercase independently for each word. A nil separator joins the
words directly.

Raises ArgumentError for invalid options.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
