Originally Posted by
Buddah
may want to check again mate, they are both crc32.
No your wrong COD4 MW2 Has adler32 COD4 MW had CRC32
Code:
uint adler32(byte[] data){
uint a = 1;
uint b = 0;
for(int i = 0; i < data.Length; i++){
a = (a + data[i]) % 65521;
b = (b + a) % 65521;
}
return (b << 16) | a;
}
This is how it will be used
Code:
iostream.Position = 0x454;
uint sum = adler32(reader.ReadBytes(iostream.Length - 0x454));
iostream.Position = 0x8;
writer.WriteUInt32(sum);
This code Calculates the check on MW2 SAVE.