Verify that a given password matches a given hash

@param string $password
@param string $passwordHash

@return bool
337907
public function verifyPassword(string $password, string $passwordHash): bool
    {
        return $this->passwordVerificationService->verifyPassword($password, $passwordHash);
    }
409472
private function checkModeBcrypt($password, $hash)
    {
        $this->cwsDebug->titleH2('Check password hash in BCRYPT mode');
        $this->cwsDebug->labelValue('Password', $password);
        $this->cwsDebug->labelValue('Hash', $hash);

        $checkHash = crypt($password, $hash);
        $this->cwsDebug->labelValue('Check hash', $checkHash);

        $result = $this->slowEquals($hash, $checkHash);
        $this->cwsDebug->labelValue('Valid?', ($result ? 'YES!' : 'NO...'));

        return $result;
    }
1103639
public function checkPassword($password)
    {
        $valid = static::$dispatcher->until(new CheckingPassword($this, $password));

        if ($valid !== null) {
            return $valid;
        }

        return static::$hasher->check($password, $this->password);
    }
731972
function CheckAdminPasswordHashWithRandomSalt(
      $password_hash_with_salt
  ) {
      if (32 == strlen($password_hash_with_salt)) {
          return (md5($this->GetRandomSalt().$this->GetConfigAttribute('admin_password_hash').$this->GetRandomSalt()) == $password_hash_with_salt);
      } else {
          return false;
      }
  }
805051
public static function passwordReHash($password = '', $hash = '')
    {
        if (self::verifyPassword($password, $hash)) {
            if (password_needs_rehash($hash, self::ALGORITHM_DEFAULT)) {
                return self::createPassword($password);
            }
        }

        return NULL;
    }
87320
public function comparePasswords($password)
    {
        $passwordSalted = $this->saltPassword($password);
        if (password_verify($passwordSalted, $this->privateKey)) {
            return true;
        }
        
        return false;
    }
1125437
public function validatePassword(string $password): bool
    {
        return \Yii::$app->security->validatePassword($password, $this->password_hash);
    }
970687
protected function password_verify_with_rehash($password_hash, $bcryt_hash)
    {
        if (!password_verify($password_hash, $bcryt_hash))
           return false;

        if (password_needs_rehash($bcryt_hash, PASSWORD_BCRYPT, array('cost' => $this->_cost)))
        {
            // Update the hash in the db
            $this->getUser()->password = $this->password;
            return $this->getUser()->save();
        }

        // Otherwise return true
        return true;
    }
288161
public function passwordRehash($password)
    {
        if (password_needs_rehash(
            $password,
            $this->config[ 'password' ][ 'algorithm' ],
            $this->config[ 'password' ][ 'options' ]
        )) {
            return $this->passwordHash($password);
        }

        return $password;
    }
1362940
function checkPassword($password)
    {
        if ($this->password == '') {
            return false;
        }
        list ($algo, $salt, $hash) = explode(':', $this->password);
        if ($hash == $algo($salt . $password)) {
            return true;
        } else {
            return false;
        }
    }
788929
protected function passwordNeedsUpdate($password = null) : bool
    {
        $current = $this->currentModelPassword();

        if ($current !== null && $this->canSync()) {
            return ! Hash::check($password, $current);
        }

        return is_null($current);
    }
14484
public static function verify($password, $hash)
    {
        $salt = Binary::getSlice($hash, 0, self::SALT_FINAL_LENGTH + 7);
        return (crypt($password, $salt) === $hash);
    }
748088
public function validatePassword($password)
    {
        try {
            return Yii::$app->security->validatePassword($password, $this->password_hash);
        } catch (Exception $e) {
            return false;
        }
    }
51399
function CheckAdminPassword(
      $password
  ) {
      return ($this->GetConfigAttribute('admin_password_hash') == md5($this->GetHashSalt().$password.$this->GetHashSalt()));
  }
78900
public function checkPassword($password)
    {
        $encryptor = PasswordEncryptor::create_for_algorithm($this->PasswordEncryption);
        return $encryptor->check($this->Password, $password, $this->Salt, $this->Member());
    }
309400
protected function verifyPassword($password, $hash)
    {
        // Check plain password.
        if($password === $hash){
            return true;
        }
        // Check md5 hash
        if (md5($password) === $hash) {
            return true;
        }
        // Check bcrypt hash
        return password_verify($password, $hash);
    }
1153801
public function login(string $password) : bool {
		if (!$this->confirmed) {
			return false;
		} elseif ($this->isLoggedIn()) {
			return true;
		} elseif ($this->doesPasswordMatch($password)) {

			// Requires a started session
			$loginToken = $this->sessionManager->login();
			$_SESSION["user_id"] = $this->id;
			$_SESSION["login_token"] = $loginToken;
			return true;
		} else {
			return false;
		}
	}