Hello Readers,
Default user class in joomla has not provided salted MD5 to hash the password. So In joomla 3.2.1 The bind function of the User class now provides the facility to calls JUserHelper::hashPassword($array['password']) to encrypt the password.
public static function hashPassword($password)
{
$phpass = new PasswordHash(10, true);
return $phpass->HashPassword($password);
}
Also you can encrypt Joomla password by this way. In Joomla 1.5,1.7 we can generate password in as given below
jimport('joomla.user.helper');
$salt = JUserHelper::genRandomPassword(32);
$crypt = JUserHelper::getCryptedPassword($password_choose, $salt);
$password = $crypt.':'.$salt;
In Joomla 3.2 below is the code.
jimport('joomla.user.helper');
$yourpass = JUserHelper::hashPassword($password_choose);
Hope it helps for you
0 Comment(s)