CoreFiles by mySites.guru
BCryptHandler.php38 lines, 931 bytes, from Joomla_5.3.3-Stable-Full_Package.zip
Raw History Compare with 5.3.2
md5
251b9331834da1227d616e733ec1360e
sha1
03e6e5aa7286d57c56b18e03e8bed880313d765d
sha256
257d1be6525b4c9db9fb2fa09bccb6c7c8d0f6a4daad14ea3bd6dcdeb9efd131
<?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;

use Joomla\Authentication\Password\BCryptHandler as BaseBCryptHandler;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * 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 155 releases, Joomla 5.0.0-alpha1 to 6.2.1-rc1. See them all, or every version of this file.