CRSAKeyPair Class Reference

class CRSAKeyPair : public CBase

This class is capable of generating an RSA public/private key pair.

By default, it generates 2 prime (standard) CRT private keys.

Inherits from

Constructor & Destructor Documentation

CRSAKeyPair(void)

IMPORT_CCRSAKeyPair(void)[protected]

Default destructor

Parameters

void

CRSAKeyPair(const CRSAKeyPair &)

CRSAKeyPair(const CRSAKeyPair &)[private]

Parameters

const CRSAKeyPair &

~CRSAKeyPair(void)

IMPORT_C~CRSAKeyPair(void)[virtual]

The destructor frees all resources owned by the object, prior to its destruction.

Parameters

void

Member Functions Documentation

ConstructL(TUint, TRSAPrivateKeyType, TUint)

voidConstructL(TUintaModulusBits,
TRSAPrivateKeyTypeaKeyType,
TUintaPublicExponent
)[private]

Parameters

TUint aModulusBits
TRSAPrivateKeyType aKeyType
TUint aPublicExponent

NewL(TUint, TRSAPrivateKeyType)

IMPORT_C CRSAKeyPair *NewL(TUintaModulusBits,
TRSAPrivateKeyTypeaKeyType = EStandardCRT
)[static]

Creates a new RSA key pair

leave
KErrNotSupported If the type of RSA key is not supported

Parameters

TUint aModulusBitsThe length of the modulus, n (in bits)
TRSAPrivateKeyType aKeyType = EStandardCRTThe type of the RSA key

NewLC(TUint, TRSAPrivateKeyType)

IMPORT_C CRSAKeyPair *NewLC(TUintaModulusBits,
TRSAPrivateKeyTypeaKeyType = EStandardCRT
)[static]

Creates a new RSA key pair

The returned pointer is put onto the cleanup stack.

leave
KErrNotSupported If the type of RSA key is not supported

Parameters

TUint aModulusBitsThe length of the modulus, n (in bits)
TRSAPrivateKeyType aKeyType = EStandardCRTThe type of the RSA key

PrivateKey(void)

IMPORT_C const CRSAPrivateKey &PrivateKey(void)const

Gets the RSA private key

Parameters

void

PublicKey(void)

IMPORT_C const CRSAPublicKey &PublicKey(void)const

Gets the RSA public key

Parameters

void

operator=(const CRSAKeyPair &)

CRSAKeyPair &operator=(const CRSAKeyPair &)[private]

Parameters

const CRSAKeyPair &

Member Data Documentation

CRSAPrivateKey * iPrivate

CRSAPrivateKey *iPrivate[protected]

The RSA private key

CRSAPublicKey * iPublic

CRSAPublicKey *iPublic[protected]

The RSA public key