CryptoSpi::CMacFactory Class Reference

class CryptoSpi::CMacFactory

The Factory to create synchronous and asynchronous Mac instances

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

Constructor & Destructor Documentation

CMacFactory()

CMacFactory()[private]

The class is used as a static class since there is no data or behaviour in the class that depends on object identity. Therefore the default constructor of this class is made private.

Member Functions 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)

leave
KErrNone if successful; otherwise, leaves with a system wide error code.

Parameters

CAsyncMac *& aMacThe pointer to CMac. This will be initialised with the plug-in implementation of the desired MAC algorithm.
const TUid aAlgorithmUidThe specific MAC algorithm desired for evaluation of MAC value. e.g. MD2, SHA1 or AES-XCBC-MAC-96, AES-XCBC-PRF-128
const CKey & aKeySymmetric key for calculating message authentication code value.
const CCryptoParams * aAlgorithmParamsThe parameters those are specific to a particular MAC algorithm. This is for extendibility and will normally be null.

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)

leave
KErrNone if successful; otherwise, leaves with a system wide error code.

Parameters

CMac *& aMacThe pointer to CMac. This will be initialised with the plug-in implementation of the desired MAC algorithm.
const TUid aAlgorithmUidThe specific MAC algorithm desired for evaluation of MAC value. e.g. MD2, SHA1 or AES-XCBC-MAC-96, AES-XCBC-PRF-128
const CKey & aKeySymmetric key for calculating message authentication code value.
const CCryptoParams * aAlgorithmParamsThe parameters those are specific to a particular MAC algorithm. This is for extendibility and will normally be null.