Joomla 3.2.1 password encryption

Try this, The following piece of code is creating Joomla standard password (Older Version 1.5,1.7 etc). jimport(‘joomla.user.helper’); $salt = JUserHelper::genRandomPassword(32); $crypt = JUserHelper::getCryptedPassword($password_choose, $salt); $password = $crypt.’:’.$salt; Joomla 3.2+ introduced PHP’s password algorithm bcrypt but it required a minimum PHP 5.3+ If you plan to use bcrypt make sure your server PHP version is capable … Read more

How to use PHP’s password_hash to hash and verify passwords

Using password_hash is the recommended way to store passwords. Don’t separate them to DB and files. Let’s say we have the following input: $password = $_POST[‘password’]; You first hash the password by doing this: $hashed_password = password_hash($password, PASSWORD_DEFAULT); Then see the output: var_dump($hashed_password); As you can see it’s hashed. (I assume you did those steps). … Read more