Advertisement
godzcheater

Halo Reach GPD Hash / Checksum

Oct 24th, 2011
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.47 KB | None | 0 0
  1.         public void FixHash()//game be expe's api xdbf
  2.         {
  3.             System.Security.Cryptography.SHA1 SHA1 = new System.Security.Cryptography.SHA1CryptoServiceProvider();
  4.  
  5.             Game.xIO_TitleSpecific1.Stream.Position = 0;
  6.             SHA1.TransformBlock(Game.xIO_TitleSpecific1.Reader.ReadBytes((System.Int32)Game.xIO_TitleSpecific1.Stream.Length), 0, (System.Int32)Game.xIO_TitleSpecific1.Stream.Length, new byte[(System.Int32)Game.xIO_TitleSpecific1.Stream.Length], 0);
  7.             Game.xIO_TitleSpecific2.Stream.Position = 0;
  8.             SHA1.TransformBlock(Game.xIO_TitleSpecific2.Reader.ReadBytes((System.Int32)Game.xIO_TitleSpecific2.Stream.Length), 0, (System.Int32)Game.xIO_TitleSpecific2.Stream.Length, new byte[(System.Int32)Game.xIO_TitleSpecific2.Stream.Length], 0);
  9.            
  10.             Game.xIO_TitleSpecific3.Stream.Position = 744;
  11.             for (int i = 0; i < 20; i++)//write the old hash to 0x99's(153)
  12.             {
  13.                 Game.xIO_TitleSpecific3.Writer.Write((System.Byte)153);
  14.             }
  15.  
  16.             Game.xIO_TitleSpecific3.Stream.Position = 0;
  17.             SHA1.TransformBlock(Game.xIO_TitleSpecific3.Reader.ReadBytes((System.Int32)Game.xIO_TitleSpecific3.Stream.Length), 0, (System.Int32)Game.xIO_TitleSpecific3.Stream.Length, new byte[(System.Int32)Game.xIO_TitleSpecific3.Stream.Length], 0);
  18.  
  19.             Game.xIO_TitleSpecific3.Stream.Position = 744;
  20.             Game.xIO_TitleSpecific3.Writer.Write(SHA1.Hash);
  21.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement