Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: hash.h
Link against: hash.lib

Class CSHA

class CSHA : public CMessageDigest;

Description

A SHA message digest

Derivation

Members

Defined in CSHA:
BlockSize(), CopyL(), Final(), Final(), Hash(), HashSize(), NewL(), ReplicateL(), Reset(), RestoreState(), StoreState(), Update(), ~CSHA()

Inherited from CBase:
Delete(), Extension_(), operator new()

Inherited from CMessageDigest:
EMD2, EMD5, ESHA1, HMAC, THashId


Construction and destruction


NewL()

static IMPORT_C CSHA *NewL(void);

Description

Creates a new SHA object.

Return value

CSHA *

A pointer to the new SHA object


~CSHA()

IMPORT_C ~CSHA(void);

Description

Destructor

[Top]


Member functions


ReplicateL()

virtual IMPORT_C CMessageDigest *ReplicateL(void);

Description

Creates a brand new reset CMessageDigest object containing no state information from the current object.

To make a copy of a message digest with its internal state intact, see CopyL().

Return value

CMessageDigest *

A pointer to the new reset CMessageDigest object


Hash()

virtual IMPORT_C TPtrC8 Hash(const TDesC8 &aMessage);

Description

Adds aMessage to the internal representation of data to be hashed, then returns a TPtrC8 of the finalised hash of all the previously appended messages.

Parameters

const TDesC8 &aMessage

Data to be included in the hash.

Return value

TPtrC8

A descriptor pointer to the buffer containing the resulting hash.


CopyL()

virtual IMPORT_C CMessageDigest *CopyL(void);

Description

Creates a new CMessageDigest object with the exact same state as the current object.

This function copies all internal state of the message digest. To create a new CMessageDigest object without the state of the current object, see ReplicateL().

Return value

CMessageDigest *

A pointer to the new CMessageDigest object


BlockSize()

virtual IMPORT_C TInt BlockSize(void);

Description

Gets the internal block size of the message digest.

Return value

TInt

Internal block size of message digest in bytes.


HashSize()

virtual IMPORT_C TInt HashSize(void);

Description

Gets the size of the message digest output.

Return value

TInt

Output size of the message digest in bytes.


Reset()

virtual IMPORT_C void Reset(void);

Description

Resets the internal state of the message digest.

A reset hash object loses all internal state representing the hashed data. A reset message digest is suitable to begin a new, distinct hash of different data. Any previously returned TPtrC8 from a call to Final() remains valid until any subsequent call to Update() or Final().


Update()

virtual IMPORT_C void Update(const TDesC8 &aMessage);

Description

Adds data to the internal representation of messages to be hashed.

Parameters

const TDesC8 &aMessage

Data to be included in the hash.


Final()

virtual IMPORT_C TPtrC8 Final(const TDesC8 &aMessage);

Description

Adds aMessage to the internal representation of data to be hashed, returns a TPtrC8 of the finalised hash of all the previously appended messages, and calls Reset().

Parameters

const TDesC8 &aMessage

Data to be included in the hash

Return value

TPtrC8

A descriptor pointer to the buffer containing the resulting hash.


Final()

virtual IMPORT_C TPtrC8 Final();

Description

Gets a TPtrC8 of the finalised hash of all the previously appended messages and then calls Reset().

Return value

TPtrC8

A descriptor pointer to the buffer containing the resulting hash.


RestoreState()

virtual void RestoreState();

Description

Restores the internal state of the message digest to a previously stored state.

See also:


StoreState()

virtual void StoreState();

Description

Stores the internal state of the message digest.