NotQwerty123 v2.1.0 NotQwerty123.RandomPassword View Source

Module to generate random passwords.

Users are often advised to use random passwords for authentication. However, creating truly random passwords is difficult for people to do well and is something that computers are usually better at.

This module provides the gen_password function, which generates a random password.

Link to this section Summary

Functions

Generate a random password

Link to this section Functions

Link to this function gen_password(opts \\ []) View Source

Generate a random password.

Options

There are two options:

  • length - length of the password, in characters

    • the default is 8
    • the minimum length is 6
  • characters - the character set - :letters, :letters_digits or :letters_digits_punc

    • the default is :letters_digits, which will use letters and digits in the password
    • :digits will only use digits
    • :letters will use uppercase and lowercase letters
    • :letters_digits_punc will use letters, digits and punctuation characters