资 源 简 介
pwgen — generate pronounceable passwords with PHP
Overview
pwgen-php is a simple PHP class which aims to clone the GNU pwgen functionality. It"s designed to be used in existing scripts/projects.
The pwgen class generates passwords which are designed to be easily memorized by humans, while being as secure as possible. Human-memorable passwords are never going to be as secure as completely random passwords. In particular, passwords generated by pwgen without the secure-option should not be used in places where the password could be attacked via a brute-force attack.
On the other hand, completely randomly generated passwords have a tendency to be written down, and are subject to being compromised in that fashion.
Usage
Generating a password is as simple as creating a new PWGen object and invoking the generate() function on it: