CoreFiles by mySites.guru
BCryptHandler.php35 lines, 817 bytes, from Joomla_4.1.2-Stable-Full_Package.zip
Raw History Compare with 4.1.1
md5
c650749e44c712c89329f026ea871ee5
sha1
96f0123717cf2d86337ace15f87dcb316209e9b3
sha256
9b4f11fc481789ee8a6c739df8a687af8f12774e62f36f3e4070ad7de688d056
<?php
/**
 * Joomla! Content Management System
 *
 * @copyright  (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\CMS\Authentication\Password;

\defined('JPATH_PLATFORM') or die;

use Joomla\Authentication\Password\BCryptHandler as BaseBCryptHandler;

/**
 * Password handler for BCrypt hashed passwords
 *
 * @since  4.0.0
 */
class BCryptHandler extends BaseBCryptHandler implements CheckIfRehashNeededHandlerInterface
{
	/**
	 * Check if the password requires rehashing
	 *
	 * @param   string  $hash  The password hash to check
	 *
	 * @return  boolean
	 *
	 * @since   4.0.0
	 */
	public function checkIfRehashNeeded(string $hash): bool
	{
		return password_needs_rehash($hash, PASSWORD_BCRYPT);
	}
}

The same content is in 51 releases, Joomla 4.0.0-beta6 to 4.2.0-beta2. See them all, or every version of this file.