Back to ChainedHandler class

Method validatePassword

public bool
validatePassword
(mixed $plaintext, mixed $hashed)
Validate a password
Parameters
  • string $pla intext The plain text password to validate
  • string $hashed The password hash to validate against
Returns
  • bool
Since
  • 4.0.0

Method validatePassword - Source code

/**
 * Validate a password
 *
 * @param   string  $plaintext  The plain text password to validate
 * @param   string  $hashed     The password hash to validate against
 *
 * @return  boolean
 *
 * @since   4.0.0
 */
public function validatePassword($plaintext, $hashed)
{
    foreach ($this->handlers as $handler) {
        if ($handler->isSupported() && $handler->validatePassword($plaintext, $hashed)) {
            return true;
        }
    }
    return false;
}