Download the PHP package jarne/password without Composer
On this page you can find all versions of the php package jarne/password. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jarne/password
More information about jarne/password
Files in jarne/password
Package password
Short Description A simple library to generate passwords
License MIT
Homepage https://github.com/jarne/password
Informations about the package password
password
A simple library to generate passwords
• Install
• Usage
• Examples
• Contribution
• License
📦 Install
This library requires PHP 7.2 or newer in order to work correctly. You can install it with:
If you don't like Composer, you can also clone the repository with:
👨💻 Usage
There are two functions in this library:
- one to generate a random password
- and one to generate a random one which is easy to remember because it sounds like a real word
The arguments are the same for both functions:
See the examples section for a short code example how to use it.
⌨️ Examples
Here are some examples how to use the functions.
Generate an 8-character long password:
If your password should only be 5 characters long, just change the second line to:
It's also possible to generate a password with more numbers than letters, for example:
In the code above, the letter chance is set to 1, the numbers chance to 15, and the special characters chance to 1, so it's likely that the password contains more numbers than other characters.
🙋 Contribution
Contributions are always very welcome! It's completely equal if you're a beginner or a more experienced developer.
Please read our Contribution Guidelines before creating an issue or submitting a pull request.
Thanks for your interest 🎉👍!