Back to BCryptHandler class

Method checkIfRehashNeeded

public bool
checkIfRehashNeeded
(string $hash)
Check if the password requires rehashing
Parameters
  • string $hash The password hash to check
Returns
  • bool
Since
  • 4.0.0
Class: BCryptHandler
Project: Joomla

Method checkIfRehashNeeded - Source code

/**
 * 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);
}