public UInt32 get_berry_checksum() { byte[] chk = getData(0, SIZE_ECB - 4); int i; for (i = 0; i < 8; i++) //These 8 bytes are taken as 0x00 for chk calculation { chk[0xC + i] = 0x00; } return(ME3.me3_checksum(chk, chk.Length)); }
public void fix_berry_checksum() { byte[] chk = getData(0, SIZE_ECB - 4); int i; for (i = 0; i < 8; i++) //These 8 bytes are taken as 0x00 for chk calculation { chk[0xC + i] = 0x00; } UInt32 checksum = ME3.me3_checksum(chk, chk.Length); setData(BitConverter.GetBytes(checksum).ToArray(), SIZE_ECB - 4); }