Game Development Reference
The result will be a 128-bit (16-octet) checksum hash of the data that was provided
to the MD5 algorithm, and will subsequently be compared against a future check-
This chapter covered two ways of generating a checksum value that can be used to
verify data integrity. Each method has different pros and cons, which can be eval-
uated on a per-project basis. The CRC-32 algorithm can be used in situations
where you are basically testing for data corruption, and also in situations where
speed is important. The MD5 algorithm has some added overhead, but its usage
offers more credible and relatively secure checksums.
Regardless of the algorithm you choose to implement, verifying data integrity
using checksums is a popular and low overhead way to ensure that you are always
processing complete and unmodified data. Reliability of tools is very important,
and using checksums offers a quick way to verify that the data that users are cre-
ating is valid, rather than finding out after the application throws an error when it
tries to process the data at a later stage.