SHARE
TWEET

Untitled

a guest Mar 22nd, 2013 27 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     QString serverId = QString("idtest");
  2.     QByteArray *pubKey = MineServerPP::instance()->ASN1PUBKEY;
  3.     srand(QTime::currentTime().msec());
  4.     QByteArray cipherToken;
  5.     for (int i = 0; i < 4; i++) {
  6.         cipherToken.append((char)Random::getRandomNumber(256));
  7.     }
  8.  
  9.     packetClient->getWriter()->writeChar((unsigned char) 0xFD);
  10.  
  11.     packetClient->getWriter()->writeShort(serverId.length());
  12.  
  13.     packetClient->getWriter()->writeString(serverId);
  14.  
  15.     packetClient->getWriter()->writeShort(pubKey->length());
  16.  
  17.     packetClient->getWriter()->writeByteArray(*pubKey);
  18.  
  19.     packetClient->getWriter()->writeShort(cipherToken.length());
  20.  
  21.     packetClient->getWriter()->writeByteArray(cipherToken);
  22.  
  23.     packetClient->getWriter()->flush();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top