RandomPassword (random_password v1.1.0)
Random Password generator.
RandomPassword
creates a module for randomly generating strings with a specified number of
alpha, decimal and symbol characters. Symbols can be optionally specified.
Link to this section Summary
Functions
Bits of entropy for password with alpha
alpha chars, decimal
decimal digits and symbol
symbol chars.
Link to this section Functions
Link to this function
entropy_bits(alpha, decimal, symbol, options \\ %{})
@spec entropy_bits(non_neg_integer(), non_neg_integer(), non_neg_integer(), map()) :: float()
Bits of entropy for password with alpha
alpha chars, decimal
decimal digits and symbol
symbol chars.
This function provides calculation of entropy bits without having to create a module.
The characters to be used for alphas
and symbols
can be specified as options; o/w defaults
are used.
example
Example
iex> RandomPassword.entropy_bits(12, 4, 2) |> Float.round(2)
91.31
iex> RandomPassword.entropy_bits(12, 4, 2, symbols: "!@#$%&") |> Float.round(2)
86.86