public function validatePassword($password, $hashedPasswordAndSalt)
    {
        $strategyIdentifier = 'default';
        if (strpos($hashedPasswordAndSalt, '=>') !== false) {
            list($strategyIdentifier, $hashedPasswordAndSalt) = explode('=>', $hashedPasswordAndSalt, 2);
        }

        /** @var $passwordHashingStrategy PasswordHashingStrategyInterface */
        list($passwordHashingStrategy, ) = $this->getPasswordHashingStrategyAndIdentifier($strategyIdentifier);
        return $passwordHashingStrategy->validatePassword($password, $hashedPasswordAndSalt, $this->getEncryptionKey());
    }
public function validatePassword($password, $hashedPasswordAndSalt)
    {
        $strategyIdentifier = 'default';
        if (strpos($hashedPasswordAndSalt, '=>') !== false) {
            list($strategyIdentifier, $hashedPasswordAndSalt) = explode('=>', $hashedPasswordAndSalt, 2);
        }

        /** @var $passwordHashingStrategy PasswordHashingStrategyInterface */
        list($passwordHashingStrategy, ) = $this->getPasswordHashingStrategyAndIdentifier($strategyIdentifier);
        return $passwordHashingStrategy->validatePassword($password, $hashedPasswordAndSalt, $this->getEncryptionKey());
    }
public function validatePassword ( $ password , $ hashedPasswordAndSalt ) { $ strategyIdentifier = 'default' ; if ( strpos ( $ hashedPasswordAndSalt , '=>' ) !== false ) { list ( $ strategyIdentifier , $ hashedPasswordAndSalt ) = explode ( '=>' , $ hashedPasswordAndSalt , 2 ) ; } /** @var $passwordHashingStrategy PasswordHashingStrategyInterface */ list ( $ passwordHashingStrategy , ) = $ this -> getPasswordHashingStrategyAndIdentifier ( $ strategyIdentifier ) ; return $ passwordHashingStrategy -> validatePassword ( $ password , $ hashedPasswordAndSalt , $ this -> getEncryptionKey ( ) ) ; }
Validate a hashed password using the configured password hashing strategy

@param string $password The cleartext password
@param string $hashedPasswordAndSalt The hashed password with salt (if used) and an optional strategy identifier
@return boolean true if the given password matches the hashed password
@api
Validate a hashed password using the configured password hashing strategy