コード例 #1
0
 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()));
 }
コード例 #2
0
 public function comparePassword(PhutilOpaqueEnvelope $password, PhabricatorUser $user)
 {
     return PhabricatorPasswordHasher::comparePassword($this->getPasswordHashInput($password, $user), new PhutilOpaqueEnvelope($this->getPasswordHash()));
 }