Symfony\Component\Security\Core\Encoder\BasePasswordEncoder::comparePasswords
Compares two passwords.
This method implements a constant-time algorithm to compare passwords to avoid (remote) timing attacks.
Signature
protected function comparePasswords(string
$password1,
string
$password2 )
Parameters
$password1
— string- The first password
$password2
— string- The second password
Returns
- Boolean
- true if the two passwords are the same, false otherwise