Password Generator
True\PasswordGenerator produces secure but memorable passwords by stitching together random adjectives and nouns — handy for default account passwords, password-reset emails, or any flow where the user has to retype or read out the value.
Generate a password
use True\PasswordGenerator;
$gen = new PasswordGenerator;
$password = $gen->generate(4);
echo $password;
// => Brave Tiger Happy Mountain
Word count
The single argument picks the structure:
| Value | Structure | Example |
|---|---|---|
2 | 1 adjective + 1 noun | Brave Tiger |
3 | 2 adjectives + 1 noun | Brave Happy Tiger |
4 (default) | 2 adjectives + 2 nouns | Brave Tiger Happy Mountain |
5 | 3 adjectives + 2 nouns | Brave Quiet Tiger Happy Mountain |
Word sources
The adjective and noun lists ship with the True package:
BP/vendor/truecastdesign/true/assets/adjectives.txtBP/vendor/truecastdesign/true/assets/nouns.txt
Each line is one word. Edit the files or drop in your own lists if you want a domain-specific vocabulary.