#include <hash.h>
class CMessageDigest : public CBase |
Public Member Enumerations | |
---|---|
enum | THashId { EMD2, EMD5, ESHA1, HMAC, ..., ESHA512 } |
Public Member Functions | |
---|---|
~CMessageDigest(void) | |
pure virtual IMPORT_C TInt | BlockSize(void) |
pure virtual IMPORT_C CMessageDigest * | CopyL(void) |
pure virtual IMPORT_C TPtrC8 | Final(const TDesC8 &) |
pure virtual IMPORT_C TPtrC8 | Final(void) |
TInt | GetExtension(TUint, TAny *&, TAny *) |
pure virtual IMPORT_C TPtrC8 | Hash(const TDesC8 &) |
pure virtual IMPORT_C TInt | HashSize(void) |
pure virtual IMPORT_C CMessageDigest * | ReplicateL(void) |
pure virtual IMPORT_C void | Reset(void) |
pure virtual void | RestoreState() |
pure virtual void | StoreState() |
pure virtual IMPORT_C void | Update(const TDesC8 &) |
Protected Member Functions | |
---|---|
CMessageDigest(void) | |
CMessageDigest(const CMessageDigest &) |
Base class for message digests.
Enumeration to identify hash functions (aka message-digest algorithms).
IMPORT_C | CMessageDigest | ( | const CMessageDigest & | aMD | ) | [protected] |
Copy constructor
Parameter | Description |
---|---|
aMD | A CMessageDigest object |
IMPORT_C TInt | BlockSize | ( | void | ) | [pure virtual] |
Gets the internal block size of the message digest.
Returns: Internal block size of message digest in bytes.
IMPORT_C CMessageDigest * | CopyL | ( | void | ) | [pure virtual] |
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
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().
Parameter | Description |
---|---|
aMessage | Data to be included in the hash |
Returns: A descriptor pointer to the buffer containing the resulting hash.
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.
Parameter | Description |
---|---|
aMessage | Data to be included in the hash. |
Returns: A descriptor pointer to the buffer containing the resulting hash.
IMPORT_C TInt | HashSize | ( | void | ) | [pure virtual] |
Gets the size of the message digest output.
Returns: Output size of the message digest in bytes.
IMPORT_C CMessageDigest * | ReplicateL | ( | void | ) | [pure 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
IMPORT_C void | Reset | ( | void | ) | [pure virtual] |
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().
void | RestoreState | ( | ) | [pure virtual] |
Restores the internal state of the message digest to a previously stored state.
See also: StoreState()
IMPORT_C void | Update | ( | const TDesC8 & | aMessage | ) | [pure virtual] |
Adds data to the internal representation of messages to be hashed.
Parameter | Description |
---|---|
aMessage | Data to be included in the hash. |