CryptoSpi::CMacFactory Class Reference

class CryptoSpi::CMacFactory

The Factory to create synchronous and asynchronous Mac instances

Public Member Functions
IMPORT_C void CreateAsyncMacL (CAsyncMac *&, const TUid , const CKey &, const CCryptoParams *)
IMPORT_C void CreateMacL (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 void CreateAsyncMacL ( CAsyncMac *& aMac,
const TUid aAlgorithmUid,
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 *& aMac The pointer to CMac. This will be initialised with the plug-in implementation of the desired MAC algorithm.
const TUid aAlgorithmUid The specific MAC algorithm desired for evaluation of MAC value. e.g. MD2, SHA1 or AES-XCBC-MAC-96, AES-XCBC-PRF-128
const CKey & aKey Symmetric key for calculating message authentication code value.
const CCryptoParams * aAlgorithmParams The 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 void CreateMacL ( CMac *& aMac,
const TUid aAlgorithmUid,
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 *& aMac The pointer to CMac. This will be initialised with the plug-in implementation of the desired MAC algorithm.
const TUid aAlgorithmUid The specific MAC algorithm desired for evaluation of MAC value. e.g. MD2, SHA1 or AES-XCBC-MAC-96, AES-XCBC-PRF-128
const CKey & aKey Symmetric key for calculating message authentication code value.
const CCryptoParams * aAlgorithmParams The parameters those are specific to a particular MAC algorithm. This is for extendibility and will normally be null.