|
User Generator 2.1.2
Synthetic user records for apps and test data, composed from the other dasmig generators for C++23
|
The rules a generated password follows. More...
#include <usergen.hpp>
Public Attributes | |
| std::size_t | min_length {12} |
| Shortest password, in characters. | |
| std::size_t | max_length {16} |
| Longest password; the length is drawn between the two. | |
| bool | lowercase {true} |
Allow a-z. | |
| bool | uppercase {true} |
Allow A-Z. | |
| bool | digits {true} |
Allow 0-9. | |
| bool | symbols {true} |
Allow punctuation (!@#$%^&*-_=+?). | |
| bool | require_each {true} |
| Include at least one character of every allowed class. | |
| bool | avoid_ambiguous {false} |
Leave out 0 O 1 l I |, which are easy to misread. | |
| password_style | style {password_style::random} |
How the password is drawn; random keeps the seeds of earlier releases. | |
The rules a generated password follows.
The defaults are a 12 to 16 character password with a lower case letter, an upper case letter, a digit and a symbol in it. The human style builds the password the way people do (see doc/data.md) and then bends it to these rules, as a sign-up form would: it drops a character the rules do not allow, adds the digit or the symbol that is missing and pads a short one, so with the default rules few passwords stay as plain as dragon123. Loosen the rules (for example {.min_length = 6, .max_length = 20, .require_each = false}) for a mix closer to the common-password lists.
Definition at line 67 of file usergen.hpp.
| bool dasmig::password_policy::avoid_ambiguous {false} |
Leave out 0 O 1 l I |, which are easy to misread.
Definition at line 76 of file usergen.hpp.
| bool dasmig::password_policy::digits {true} |
Allow 0-9.
Definition at line 73 of file usergen.hpp.
| bool dasmig::password_policy::lowercase {true} |
Allow a-z.
Definition at line 71 of file usergen.hpp.
| std::size_t dasmig::password_policy::max_length {16} |
Longest password; the length is drawn between the two.
Definition at line 70 of file usergen.hpp.
| std::size_t dasmig::password_policy::min_length {12} |
Shortest password, in characters.
Definition at line 69 of file usergen.hpp.
| bool dasmig::password_policy::require_each {true} |
Include at least one character of every allowed class.
Definition at line 75 of file usergen.hpp.
| password_style dasmig::password_policy::style {password_style::random} |
How the password is drawn; random keeps the seeds of earlier releases.
Definition at line 77 of file usergen.hpp.
| bool dasmig::password_policy::symbols {true} |
Allow punctuation (!@#$%^&*-_=+?).
Definition at line 74 of file usergen.hpp.
| bool dasmig::password_policy::uppercase {true} |
Allow A-Z.
Definition at line 72 of file usergen.hpp.