random_password v1.0.2 RandomPassword

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 chars using symbols, which defaults to "!#$%&()*+,-./:;<=>?@[]^_{|}~"

Link to this section Functions

Link to this function

entropy_bits(alpha, decimal, symbol, symbols \\ %RandomPassword.Defaults{}.symbols())

Bits of entropy for password with alpha alpha chars, decimal decimal digits and symbol chars using symbols, which defaults to "!#$%&()*+,-./:;<=>?@[]^_{|}~"

This function provides calculation of entropy bits without having to create a module.

Example

iex> RandomPassword.entropy_bits(12, 4, 2) |> Float.round(2)
91.31

iex> RandomPassword.entropy_bits(12, 4, 2, "!@#$%&")  |> Float.round(2)
86.86