示例#1
0
 public function setPassword($password)
 {
     $this->salt = Authorizer::generateSalt();
     $this->hash = Authorizer::hashPassword($password, $this->salt);
 }
示例#2
0
 public static function setPassword(Student $student, $password)
 {
     $student->setSalt(LoginHelper::generateSalt());
     $student->setHash(LoginHelper::hashPassword($password, $student->getSalt()));
 }