public function comparePassword(PhutilOpaqueEnvelope $envelope) { if (!strlen($envelope->openEnvelope())) { return false; } if (!strlen($this->getPasswordHash())) { return false; } return PhabricatorPasswordHasher::comparePassword($this->getPasswordHashInput($envelope), new PhutilOpaqueEnvelope($this->getPasswordHash())); }
public function comparePassword(PhutilOpaqueEnvelope $password, PhabricatorUser $user) { return PhabricatorPasswordHasher::comparePassword($this->getPasswordHashInput($password, $user), new PhutilOpaqueEnvelope($this->getPasswordHash())); }