Or is there a software to auto generate random passwords?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
You could just use PEAR's Text_Password package - it supports quite a few algorithms for generating them; and frees up your time to go onto something else.
use
hackzilla/password-generator
it has many options to create different kind of passwords:
ComputerPasswordGenerator()
HybridPasswordGenerator()
->sjgX-PFjH-zxMz-PRDz-G6mx-wMJ4-ST24
HumanPasswordGenerator()
->Verkuemmerungen-verlottertet-dreinzuschauen
(word list based. in this case a german word list)RequirementPasswordGenerator()
ComputerPasswordGenerator
RequirementPasswordGenerator
I want to play the game. The simplest way would be to do:
This is pretty much just a modification of the first answer. Specify the characters you want in the second parameters and the length of the password in the first.
A good password should be a mixture of both uppercase, lowercase, has number, letters, has special characters and its more than 6 characters long. Here is function I use on my apps.
Pwgen-php produces save, pronounceable (easier to remember) passwords: http://code.google.com/p/pwgen-php/
Might that be acceptable?
Another, very simple (and secure!) way to do this is the following (I generate all my own passwords that way):
This generates a 16 character password that uses quite a sane range of characters.
However, depending on your requirements (for example if a user needs to type in their password), it may be desirable to remove characters that migth be confused (such as l, I, 1, 0, O, 5, S, and so on). In that case, the above solution is probably a bit too simple.