Hashes

Microchip TCP/IP Stack

Microchip TCP/IP Stack Help
Hashes

The Hashes module calculates MD5 and/or SHA-1 hash sums of data. Hash sums are one-way digest functions, meaning that the original message cannot be derived from the hash of the message. Collisions, while exceedingly rare, do exist. However, they are extremely difficult to create. 

Hash functions are generally used for message integrity and authentication purposes. They are used extensively by encryption protocols such as SSL to verify that a message has not been tampered with during transit. 

The following flow diagram demonstrates how to use this module. 

 

To use the hash functions, first declare a HASH_SUM structure and pass a pointer to it to either MD5Initialize or SHA1Initialize. Then, call HashAddData or HashAddROMData as many times as are necessary to provide all the data to the hash. Call MD5Calculate or SHA1Calculate at any time to obtain the hash sum up to the current point. After calculation, continue adding data and repeating this process as many times as necessary.

Topics
Name 
Description 
Functions and variables accessible by the stack application 
Functions and variables intended to be accessed only by the stack 
Functions and variables internal to the Hashes module 
Microchip TCP/IP Stack 5.42.08 - June 15, 2013
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.