1 The SHA (Secure Hash Algorithm) library.
2 SHA is a message digest algorithm that can be used to condense an arbitrary
3 length message down to a 20 byte hash. The functions all need to be passed
4 a SHA_CTX which is used to hold the SHA context during multiple SHA_Update()
5 function calls. The normal method of use for this library is as follows
6 This library contains both SHA and SHA-1 digest algorithms. SHA-1 is
7 an update to SHA (which should really be called SHA-0 now) which
8 tweaks the algorithm slightly. The SHA-1 algorithm is used by simply
9 using SHA1_Init(), SHA1_Update(), SHA1_Final() and SHA1() instead of the
18 This library requires the inclusion of 'sha.h'.
20 The functions are as follows:
24 This function needs to be called to initiate a SHA_CTX structure for
31 This updates the message digest context being generated with 'len'
32 bytes from the 'data' pointer. The number of bytes can be any
38 This function is called when a message digest of the data digested
39 with SHA_Update() is wanted. The message digest is put in the 'md'
40 array and is SHA_DIGEST_LENGTH (20) bytes long.
46 This function performs a SHA_Init(), followed by a SHA_Update()
47 followed by a SHA_Final() (using a local SHA_CTX).
48 The resulting digest is put into 'md' if it is not NULL.
49 Regardless of the value of 'md', the message
50 digest is returned from the function. If 'md' was NULL, the message
51 digest returned is being stored in a static structure.