The checksum is a simple and a way to verify that the buffer is written does not have errors.. with a certain degree of safety.
You add up all the values of the memory or the buffer that is lost as a byte, word (2 bytes), or long (4 bytes) and save..
in the case in which the write is not successful, it means that easily this sum is to be calculated will be differences from the right, and then you realize that at least one error is present
Note that is not a way to 100% because of errors there are two of them, hypothetically (because in practice the possibility that happening are very rare) the first may be cancelled by the second for the purposes of the calculation of the checksum.. (like if instead of writing 5 is written to 0.. and then after instead of writing 10, is written 15.. these 2 errors cancel out in the calculation of chksum).
Now if the files are identical and of the same machine, it seems to me impossible that the checksum is different.. in other words, if it means that there are differences, and then or the file is different, or it was written with one or more errors
