Quote:
Originally Posted by poltomb
PHP Code:
$new_pword = random_password($_new_passlength);
$encrypt_pword = encrypt($new_pword);
|
If you use that, you will have some bugged encrypted password like :
0x0ffffff890ffffffcb0ffffffd40ffffffba0ffffff030ff ffffa00ffffffde0ffffffc60fffffff30ffffff6a0ffffff4 c0ffffff4c0ffffff810ffffff1b0ffffff3d0ffffff3d
and not :
0xb18e86b70a7a3ea99c052323ee745252
so i recommand to include the generation and encryption in a while till the lenght is ok :
PHP Code:
$encrypt_pword = "";
while(strlen($encrypt_pword)!=34){
$new_pword = random_password($_new_passlength);
$encrypt_pword = encrypt($new_pword);
}