Namespaces
Variants
Actions
Revision as of 10:40, 28 February 2012 by croozeus (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Calculate SHA-1 hash value of a specific message.

Jump to: navigation, search




Article Metadata

Tested with
Devices(s): E90

Compatibility
Platform(s): S60 3rd,3rd FP1,3rd Fp2

Platform Security
Capabilities: )

Article
Keywords: keywords= CSHA1,CSHA1::Update(),CSHA1::Final().
Created: lming (01 Nov 2008)
Last edited: croozeus (28 Feb 2012)

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.

95 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved