password_generator generates memorable passwords that can be easily remembered.
Passwords are often difficult to remember, especially if they are simply a random combination of letters and numbers. With password_generator, passwords are generated based on phonemic combinations. These combinations make it easier for users to recall the password without having to refer back to the message that contained the password. These types of passwords help improve the overall user experience.
This implementation is based entirely off Ian Macdonald's ruby-password library, repackaged to make it more easily portable and easier to invoke.
Passwords with lowercase letters
Password.generate # => areemoni
Passwords with a digit
Password.generate(8, Password::ONE_DIGIT) # => thohk8tu
Passwords with a capital letter
Password.generate(8, Password::ONE_CASE) => Hjowecug
Passwords with both a digit and a capital letter
Password.generate(8, Password::ONE_DIGIT | Password::ONE_CASE) # => Kzgth0il
Passwords with both a digit and a capital letter, but all print friendly (no 0,o,O,L,l,i,I,1)
Password.generate(8, Password::ONE_DIGIT | Password::ONE_CASE | Password::PRINT_FRIENDLY) # => Kzgth2ug
Ian Macdonald - ruby-password