Ensuring Data Integrity with Hash Codes
A hash value is a numeric value of a fixed length that uniquely identifies data. Hash values are used with digital signatures because hash values represent a large amount of data as a much smaller numeric value. You can efficiently sign a hash value instead of signing the larger value. Hash values are also useful for verifying the integrity of data sent through insecure channels. The hash value of received data can be compared to the hash value of data as it was sent to determine whether the data was altered. This section describes how to generate hash codes using the classes in the System.Security.Cryptography namespace.