CoreFiles by mySites.guru
BCryptHandler.php35 lines, 829 bytes, from Joomla_4.0.0-alpha7-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha6
md5
7792f18f5e01a7e205a68e58774b616d
sha1
c29267af0c0abd0e59d7c6c98dd31ab8be3ae337
sha256
9052c69439b9cc1d971735c18367492b52645936d61fedd837db3abca92d7d94
<?php
/**
 * Joomla! Content Management System
 *
 * @copyright  Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @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 4 releases, Joomla 4.0.0-alpha7 to 4.0.0-alpha10. See them all, or every version of this file.