stoneharry

Untitled

Jun 16th, 2012
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.77 KB | None | 0 0
  1.     static const unsigned short hash_constant (0x7a0b);
  2.     Sha1Hash newone;
  3.     newone.UpdateBigNumbers (&m_sessionkey, NULL);
  4.     uint8 test = hash_constant;
  5.     newone.UpdateData (&test, sizeof (hash_constant));
  6.     newone.Finalize();
  7.     const unsigned char* hashed_session_key (newone.GetDigest());
  8.  
  9.     Log.Debug("Auth", "Hashed Key = %s", hashed_session_key);
  10.  
  11.     BigNumber result;
  12.  
  13.     result.SetBinary(hashed_session_key, sizeof(hashed_session_key));
  14.  
  15.     Log.Debug("Auth", "Hashed = %s", hashed_session_key);
  16.  
  17.     Log.Debug("Auth", "Big Number = %s", result);
  18.     Log.Debug("Auth", "Big Number = %s", result.AsDecStr());
  19.  
  20.     result.SetBinary(hashed_session_key, sizeof(hashed_session_key)/2);
  21.     Log.Debug("Auth", "Big Number = %s", result);
  22.     Log.Debug("Auth", "Big Number = %s", result.AsDecStr());
Advertisement
Add Comment
Please, Sign In to add comment