Calculate SHA-1 hash value of a specific message.
Overview
This snippet demonstrates how to Calculate SHA-1 hash value of a specific message:"SHA-1 is the best established of the existing SHA hash functions, and is employed in several widely used security applications and protocols. "
This snippet can be self-signed
Use Case
Calculate SHA-1 hash value of a specific message.
Source file
//necessary library
LIBRARY hash.lib
//necessary header file
#include <hash.h>
_LIT8(message1, "SHA-1 is the best established of the existing SHA hash functions, and is employed in several widely used security applications and protocols.");
TBuf8<32> hashValue;
CSHA1* pSha1= CSHA1::NewL();
const TPtrC8 ptr = pSha1->Hash(message1);
hashValue.Copy(ptr);
delete pSha1;
Postconditions
hashValue contains resulting SHA1 hash of message1.

