CryptoSpi::CMacFactory Class Reference

#include <cryptospi/cryptomacapi.h>

class CryptoSpi::CMacFactory
Public Member Functions
IMPORT_C voidCreateAsyncMacL(CAsyncMac *&, const TUid, const CKey &, const CCryptoParams *)
IMPORT_C voidCreateMacL(CMac *&, const TUid, const CKey &, const CCryptoParams *)

Detailed Description

The Factory to create synchronous and asynchronous Mac instances

Member Function Documentation

CreateAsyncMacL ( CAsyncMac *&, const TUid, const CKey &, const CCryptoParams * )

IMPORT_C voidCreateAsyncMacL(CAsyncMac *&aMac,
const TUidaAlgorithmUid,
const CKey &aKey,
const CCryptoParams *aAlgorithmParams
)[static]

Create a CAsyncMac instance (for hardware based MAC plug-in dll implementation)

Parameters
aMacThe pointer to CMac. This will be initialised with the plug-in implementation of the desired MAC algorithm.
aAlgorithmUidThe specific MAC algorithm desired for evaluation of MAC value. e.g. MD2, SHA1 or AES-XCBC-MAC-96, AES-XCBC-PRF-128
aKeySymmetric key for calculating message authentication code value.
aAlgorithmParamsThe parameters those are specific to a particular MAC algorithm. This is for extendibility and will normally be null.
Leave Codes
KErrNoneif successful; otherwise, leaves with a system wide error code.

CreateMacL ( CMac *&, const TUid, const CKey &, const CCryptoParams * )

IMPORT_C voidCreateMacL(CMac *&aMac,
const TUidaAlgorithmUid,
const CKey &aKey,
const CCryptoParams *aAlgorithmParams
)[static]

Create a CMac instance (for software based MAC plug-in dll implementation)

Parameters
aMacThe pointer to CMac. This will be initialised with the plug-in implementation of the desired MAC algorithm.
aAlgorithmUidThe specific MAC algorithm desired for evaluation of MAC value. e.g. MD2, SHA1 or AES-XCBC-MAC-96, AES-XCBC-PRF-128
aKeySymmetric key for calculating message authentication code value.
aAlgorithmParamsThe parameters those are specific to a particular MAC algorithm. This is for extendibility and will normally be null.
Leave Codes
KErrNoneif successful; otherwise, leaves with a system wide error code.