View difference between Paste ID: yQTeKhw0 and QM3c2LSa
SHOW: | | - or go back to the newest paste.
1
"
2
Security:
3
-> Custom Checksum
4
   -> Offset: Size - 4
5-
   -> Calculate Start: 0
5+
   -> Calculation Start: 0
6-
   -> Calculate Length: Size - 4
6+
   -> Calculation Length: Size - 4
7
"
8
9
private int CalculateChecksum(byte[] data) {
10
    using (var xIO = new MasterIO(data, Endian.BIG)) {
11
        int count = (data.Length / 4) - 1;
12
13
        int sum = 0x5C0999;
14
        for (int i = 0; i < count; ++i)
15
            sum += xIO.Reader.ReadInt32();
16
17
        return sum;
18
    }
19
}