CHMAC Class Reference

#include <hash.h>

Link against: hash.lib

class CHMAC : public CMessageDigest

Inherits from

Detailed Description

An HMAC (Hashed Message Authentication Code)

Constructor & Destructor Documentation

CHMAC ( void )

CHMAC(void)[protected]

CHMAC ( CMessageDigest * )

CHMAC(CMessageDigest *aDigest)[protected]

CHMAC ( const CHMAC & )

CHMAC(const CHMAC &aHMAC)[protected]

~CHMAC ( void )

IMPORT_C~CHMAC(void)

Destructor

Member Function Documentation

BlockSize ( void )

IMPORT_C TIntBlockSize(void)[virtual]

Gets the internal block size of the message digest.

Returns: Internal block size of message digest in bytes.

CopyL ( void )

IMPORT_C CMessageDigest *CopyL(void)[virtual]

Reimplemented from CMessageDigest::CopyL(void)

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().

Returns: A pointer to the new CMessageDigest object

Final ( const TDesC8 & )

IMPORT_C TPtrC8Final(const TDesC8 &aMessage)[virtual]

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().

Since
v8.0
ParameterDescription
aMessageData to be included in the hash

Returns: A descriptor pointer to the buffer containing the resulting hash.

Final ( )

IMPORT_C TPtrC8Final()[virtual]

Reimplemented from CMessageDigest::Final(void)

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

Since
v8.0

Returns: A descriptor pointer to the buffer containing the resulting hash.

Hash ( const TDesC8 & )

IMPORT_C TPtrC8Hash(const TDesC8 &aMessage)[virtual]

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.

ParameterDescription
aMessageData to be included in the hash.

Returns: A descriptor pointer to the buffer containing the resulting hash.

HashSize ( void )

IMPORT_C TIntHashSize(void)[virtual]

Gets the size of the message digest output.

Returns: Output size of the message digest in bytes.

InitialiseL ( const TDesC8 & )

voidInitialiseL(const TDesC8 &aKey)[protected]

NewL ( const TDesC8 &, CMessageDigest * )

IMPORT_C CHMAC *NewL(const TDesC8 &aKey,
CMessageDigest *aDigest
)[static]

Creates a new HMAC object from a specified type of message digest and authentication key.

ParameterDescription
aKeyAuthentication key.
aDigestA message digest to construct the HMAC from.

Returns: A pointer to the new CHMAC object. The resulting HMAC object takes ownership of aDigest and is responsible for its deletion.

ReplicateL ( void )

IMPORT_C CMessageDigest *ReplicateL(void)[virtual]

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().

Returns: A pointer to the new reset CMessageDigest object

Reset ( void )

IMPORT_C voidReset(void)[virtual]

Reimplemented from CMessageDigest::Reset(void)

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().

RestoreState ( )

voidRestoreState()[virtual]

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

See also: StoreState()

StoreState ( )

voidStoreState()[virtual]

Reimplemented from CMessageDigest::StoreState()

Stores the internal state of the message digest.

Update ( const TDesC8 & )

IMPORT_C voidUpdate(const TDesC8 &aMessage)[virtual]

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

Since
v8.0
ParameterDescription
aMessageData to be included in the hash.