Choose a checksum algorithm and implement it. You have enough algorithms to choose from, see
http://en.wikipedia.org/wiki/Checksum[
^]. See the Web referenced from this article.
You can use already implemented
Cryptographic Hash Function (
http://en.wikipedia.org/wiki/Cryptographic_hash_function[
^]) from the name space
System.Security.Cryptography
, for example, use one of the classed derived from
System.Security.Cryptography.HashAlgorithm
each representing a Cryptographic Hash Function from the "SHA" family (see
http://en.wikipedia.org/wiki/SHA-2[
^]) or MD5 (
http://en.wikipedia.org/wiki/MD5[
^]) using the class
System.Security.Cryptography.MD5
.
Note: Don't use MD5 for any security purposes, as this algorithm is considered broken, see
http://en.wikipedia.org/wiki/MD5[
^]. For checksum purposes it is good enough though.
[EDIT]
Here I found CRC implementation:
CRC Encoding[
^].
There are many others.
—SA