Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "
- Security:
- -> Custom Encryption
- -> MD5
- -> Offset: 0
- -> Calculation Start: 16
- -> Calculation Length: Size - 16
- Additional:
- The same function is used to de/encrypt the save.
- MD5 hash is stored at the beginning of the decrypted data.
- Each data (Personal, Config, Game) has it's own encryption salt.
- "
- public enum Salts : uint {
- Config = 0x625CCB25,
- Game = 0xF30045E5,
- Personal = 0x46F8A180
- }
- private byte[] EncData(byte[] source) {
- uint next = Salts.Game;
- using (var src = new MasterIO(source)) {
- using (var res = new MasterIO()) {
- for (int i = 0; i < source.Length >> 2; ++i) {
- next ^= (next << 13);
- next ^= (next >> 7);
- next ^= (next << 5);
- res.Writer.WriteUInt32(src.Reader.ReadUInt32() ^ next);
- }
- return res.Buffer;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement