Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Store sessionkey
- m_account->SetSessionKey(m_sessionkey.AsByteArray());
- // Disabled because the server algorithm seems to be unable to generate the same result as the client.
- /*
- // Hash the session key so that the logon DB can know
- static const unsigned short hash_constant (0x7a0b);
- Sha1Hash newone;
- newone.UpdateBigNumbers (&m_sessionkey, NULL);
- newone.UpdateData ((uint8*)&hash_constant, sizeof (hash_constant));
- newone.Finalize();
- BigNumber hashed_session_key;
- hashed_session_key.SetBinary (newone.GetDigest(), newone.GetLength());
- // Let the DB know
- sLogonSQL->Execute("UPDATE `account_messages` SET `hash` = '%s' WHERE `account` = '%s';", hashed_session_key.AsDecStr(), m_account->UsernamePtr);
- */
Advertisement
Add Comment
Please, Sign In to add comment