Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • password encryption in joomla 3.2.1

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 315
    Comment on it

    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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: