CoreFiles by mySites.guru
Argon2idHandler.php34 lines, 836 bytes, from Joomla_4.2.0-Stable-Full_Package.zip
Raw History Compare with 4.1.5
md5
7477f5ae998479b41e48cf40354f14bb
sha1
4a7c32e1650f73ce3aac8765f3bb8faf6b9aa89e
sha256
09a6cabec6342ef228a822366b0f451d644ebc016561901f30b171468a1627ef
<?php

/**
 * Joomla! Content Management System
 *
 * @copyright  (C) 2018 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\Argon2idHandler as BaseArgon2idHandler;

/**
 * Password handler for Argon2id hashed passwords
 *
 * @since  4.0.0
 */
class Argon2idHandler extends BaseArgon2idHandler 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_ARGON2ID);
    }
}

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.