//From inc/admin/pwtool.php:
echo "Strong Password: " . '' . make_password(15) . "";
//From libs/functions.php:
if (!function_exists('make_password')) :
/**
* @public
* @uses make_seed()
* Generate a strong password
* @return string
*/
function make_password($password_length)
{
srand(make_seed());
$alfa = "!@123!@4567!@890qwer!@tyuiopa@!sdfghjkl@!zxcvbn@!mQWERTYUIO@!PASDFGH@!JKLZXCVBNM!@";
$token = "";
for($i = 0; $i < $password_length; $i ++) {
$token .= $alfa[rand(0, strlen($alfa))];
}
return $token;
}
endif;
http://pastebin.com/4rJjz3S2
0 comments:
Post a Comment