Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void FixHash()//game be expe's api xdbf
- {
- System.Security.Cryptography.SHA1 SHA1 = new System.Security.Cryptography.SHA1CryptoServiceProvider();
- Game.xIO_TitleSpecific1.Stream.Position = 0;
- 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);
- Game.xIO_TitleSpecific2.Stream.Position = 0;
- 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);
- Game.xIO_TitleSpecific3.Stream.Position = 744;
- for (int i = 0; i < 20; i++)//write the old hash to 0x99's(153)
- {
- Game.xIO_TitleSpecific3.Writer.Write((System.Byte)153);
- }
- Game.xIO_TitleSpecific3.Stream.Position = 0;
- 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);
- Game.xIO_TitleSpecific3.Stream.Position = 744;
- Game.xIO_TitleSpecific3.Writer.Write(SHA1.Hash);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement