CoreFiles by mySites.guru
Argon2iHandler.php34 lines, 830 bytes, from Joomla_4.2.0-Stable-Full_Package.zip
Raw History Compare with 4.1.5
md5
4cc6fbe192186299d57f7a8c7f0c7856
sha1
4aa9d34871c493bb57d5d17e2d2f9a84360a4a57
sha256
75c53f0616bcae7239416b32cfa49a7d716546b010eda8de693d226f886fe08b
<?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\Argon2iHandler as BaseArgon2iHandler;

/**
 * Password handler for Argon2i hashed passwords
 *
 * @since  4.0.0
 */
class Argon2iHandler extends BaseArgon2iHandler 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_ARGON2I);
    }
}

The same content is in 5 releases, Joomla 4.2.0-beta3 to 4.2.1-rc2. See them all, or every version of this file.