|
Posted by Xenophaw on 10/02/62 11:18
"Mark D Smith" <usenet@NOSPAM.obantec.net> wrote:
> Hi
>
> i am using a pear addition Text_Password
>
> $pass = Text_Password::create($length = 8, $type =
> 'unpronounceable',$chars
> = '');
>
> problem is $pass contains some chars that are not A-Za-z 0-9, i have seen
> underscores & accented chars returned.
> is there a better way to generate an 8 char password for users?. I will be
> using crypt to put in mysql database.
>
> Mark
>
If the lengh is not a problem, I would translate the result from
Text_Password::create() like this base_convert(bin2hex($pass), 16, 36).
In this way you would obtain just characters in a-z 0-9, but the password
lenght would become 12 characters. As you already get an unpronunciable
password, for the user would not be bothering to have to remember 4
characters more.
I hope this will help you.
[Back to original message]
|