CryptoSpi::MAsyncHash Class Reference

class CryptoSpi::MAsyncHash : public CryptoSpi::MPlugin

Inherits from

Member Functions Documentation

Cancel()

voidCancel()[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 &)

voidFinal(const TDesC8 &aMessage,
TPtrC8aFinal,
TRequestStatus &aStatus
)[pure virtual]

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

Parameters

const TDesC8 & aMessageData to be included in the hash.
TPtrC8 aFinalA descriptor pointer to the buffer containing the resulting hash.
TRequestStatus & aStatus

Hash(const TDesC8 &, TPtrC8, TRequestStatus &)

voidHash(const TDesC8 &aMessage,
TPtrC8aHash,
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 & aMessageThe data to be included in the hash.
TPtrC8 aHashA 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 &)

voidSetKeyL(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 & aKeyThe key for HMAC

SetOperationModeL(TUid)

voidSetOperationModeL(TUidaOperationMode)[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 aOperationModeThe UID to identifiy the operation mode

Update(const TDesC8 &, TRequestStatus &)

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

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

Parameters

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