CryptoSpi::MMac Class Reference

class CryptoSpi::MMac : public CryptoSpi::MPlugin

The generic CryptoSPI MAC definition. This allow plug-ins to implement extensible MAC functionality and to work with all known existing hash based or symmetric cipher based MAC algorithms for e.g. MD2, MD4, MD5, SHA-1, SHA-256, SHA-512, RIPEMD-160, etc. or AES-XCBC-MAC-96, AES-XCBC-PRF-128 etc. respectively.

Inherits from

Member Functions Documentation

CopyL()

MMac * CopyL ( ) [pure virtual]

Creates a new MMac object with the exact same state as the current object. This function copies all internal state of the message digest.

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

FinalL(const TDesC8 &)

TPtrC8 FinalL ( const TDesC8 & aMessage ) [pure virtual]

Produces a final MAC value from all the previous updates of data to be MACed. It resets the MAC algorithm in a state similar to creating a new MAC instance with the same underlying algorithm and supplied symmetric key.

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

Parameters

const TDesC8 & aMessage The data to be included in the MAC evaluation.

MacL(const TDesC8 &)

TPtrC8 MacL ( const TDesC8 & aMessage ) [pure virtual]

Adds message to the internal representation of data for which the MAC value needs to be evaluated and then returns a TPtrC8 of the finalised MAC value of all the previously appended messages.

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

Parameters

const TDesC8 & aMessage The data for which MAC value is to be evaluated.

ReInitialiseAndSetKeyL(const CKey &)

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

This re-initialises the underlying MAC algorithm with a new symmetric key. It resets the MAC algorithm in a state similar to creating a new MAC instance with the same underlying algorithm but a new symmetric key.

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

Parameters

const CKey & aKey Symmetric key for calculating message authentication code value.

ReplicateL()

MMac * ReplicateL ( ) [pure virtual]

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

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

UpdateL(const TDesC8 &)

void UpdateL ( const TDesC8 & aMessage ) [pure virtual]

Adds data to the internal representation of messages for which the MAC value needs to be evaluated.

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

Parameters

const TDesC8 & aMessage The data to be included in the MAC evaluation.