Hi,
I am trying to generate a simple crypt password which will be written to the 'qmail' poppasswd file.
Although generating the password is not a problem, the password geberated and written do not allow user login to POP server.
I am not sure if php crypt will generate the type of password i am looking for, and I don't want to go Perls way to get this small job done.
One of the things I notice about the password being generated is, the encryption is always the same for the same password. This is obviously not good 🙂
Here is the basic code :
$rand='~test123';
$salt = substr($rand, 0, 2);
$enc_pw = crypt($rand, $salt);
echo $rand . "<br>" . $enc_pw;
Any suggestions would be much appreciated.
Thank you.