コード例 #1
0
ファイル: DesktopPlayer.php プロジェクト: vibrocil/BigBrother
 public function bigBrother_processAuthentication(BigBrother $plugin, EncryptionResponsePacket $packet)
 {
     $this->bigBrother_secret = $plugin->decryptBinary($packet->sharedSecret);
     $token = $plugin->decryptBinary($packet->verifyToken);
     $this->interface->enableEncryption($this, $this->bigBrother_secret);
     if ($token !== $this->bigBrother_checkToken) {
         $this->close("", "Invalid check token");
     } else {
         $task = new AuthenticateOnline($this->clientID, $this->bigBrother_username, Binary::sha1("" . $this->bigBrother_secret . $plugin->getASN1PublicKey()));
         $this->server->getScheduler()->scheduleAsyncTask($task);
     }
 }