stoneharry

Untitled

Jul 5th, 2013
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1.     // Store sessionkey
  2.     m_account->SetSessionKey(m_sessionkey.AsByteArray());
  3.  
  4.     // Disabled because the server algorithm seems to be unable to generate the same result as the client.
  5.     /*
  6.     // Hash the session key so that the logon DB can know
  7.     static const unsigned short hash_constant (0x7a0b);
  8.     Sha1Hash newone;
  9.     newone.UpdateBigNumbers (&m_sessionkey, NULL);
  10.     newone.UpdateData ((uint8*)&hash_constant, sizeof (hash_constant));
  11.     newone.Finalize();
  12.     BigNumber hashed_session_key;
  13.     hashed_session_key.SetBinary (newone.GetDigest(), newone.GetLength());
  14.  
  15.     // Let the DB know
  16.     sLogonSQL->Execute("UPDATE `account_messages` SET `hash` = '%s' WHERE `account` = '%s';", hashed_session_key.AsDecStr(), m_account->UsernamePtr);
  17.     */
Advertisement
Add Comment
Please, Sign In to add comment