CryptoSpi::MAsyncHash Class Reference

class CryptoSpi::MAsyncHash : public CryptoSpi::MPlugin

Inherits from

Member Functions Documentation

Cancel()

void Cancel ( ) [pure virtual]

Cancel an outstanding request

CopyL()

MAsyncHash * CopyL ( ) [pure virtual]

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

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

leave
... Any of the crypto error codes defined in cryptospi_errs.h or any of the system-wide error codes.

Final(const TDesC8 &, TPtrC8, TRequestStatus &)

void Final ( const TDesC8 & aMessage,
TPtrC8 aFinal,
TRequestStatus & aStatus
) [pure virtual]

Produces a final hash value from all the previous updates of data to be hashed.

Parameters

const TDesC8 & aMessage Data to be included in the hash.
TPtrC8 aFinal A descriptor pointer to the buffer containing the resulting hash.
TRequestStatus & aStatus

Hash(const TDesC8 &, TPtrC8, TRequestStatus &)

void Hash ( const TDesC8 & aMessage,
TPtrC8 aHash,
TRequestStatus & aStatus
) [pure 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.

Parameters

const TDesC8 & aMessage The data to be included in the hash.
TPtrC8 aHash A descriptor pointer to the buffer containing the resulting hash.
TRequestStatus & aStatus

ReplicateL()

MAsyncHash * ReplicateL ( ) [pure virtual]

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

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

leave
... Any of the crypto error codes defined in cryptospi_errs.h or any of the system-wide error codes.

SetKeyL(const CKey &)

void SetKeyL ( const CKey & aKey ) [pure virtual]

Set the key used for HMAC mode operation.
leave
KErrArgument if aKey is not of the expected type.
leave
KErrNotSupported if the key is not of valid length.
leave
... Any of the crypto error codes defined in cryptospi_errs.h or any of the system-wide error codes.

Parameters

const CKey & aKey The key for HMAC

SetOperationModeL(TUid)

void SetOperationModeL ( TUid aOperationMode ) [pure virtual]

Set the operation mode, ie hash or hmac
leave
KErrArgument if aKey is not of the expected type.
leave
KErrNotSupported if the key is not of valid length.
leave
... Any of the crypto error codes defined in cryptospi_errs.h or any of the system-wide error codes.

Parameters

TUid aOperationMode The UID to identifiy the operation mode

Update(const TDesC8 &, TRequestStatus &)

void Update ( const TDesC8 & aMessage,
TRequestStatus & aStatus
) [pure virtual]

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

Parameters

const TDesC8 & aMessage The data to be included in the hash.
TRequestStatus & aStatus