CRSAKeyPair Class Reference

#include <asymmetrickeys.h>

class CRSAKeyPair : public CBase

Inherits from

Detailed Description

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

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

Member Attribute Documentation

iPrivate

CRSAPrivateKey *iPrivate[protected]

The RSA private key

iPublic

CRSAPublicKey *iPublic[protected]

The RSA public key

Constructor & Destructor Documentation

CRSAKeyPair ( void )

IMPORT_CCRSAKeyPair(void)[protected]

Default destructor

~CRSAKeyPair ( void )

IMPORT_C~CRSAKeyPair(void)[virtual]

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

Member Function Documentation

NewL ( TUint, TRSAPrivateKeyType )

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

Creates a new RSA key pair

Parameters
aModulusBitsThe length of the modulus, n (in bits)
aKeyTypeThe type of the RSA key
Return Value
A pointer to a new CRSAKeyPair object
Leave Codes
KErrNotSupportedIf the type of RSA key is not supported

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.

Parameters
aModulusBitsThe length of the modulus, n (in bits)
aKeyTypeThe type of the RSA key
Return Value
A pointer to a new CRSAKeyPair object
Leave Codes
KErrNotSupportedIf the type of RSA key is not supported

PrivateKey ( void )

IMPORT_C const CRSAPrivateKey &PrivateKey(void)const

Gets the RSA private key

Return Value
A CRSAPrivateKey object

PublicKey ( void )

IMPORT_C const CRSAPublicKey &PublicKey(void)const

Gets the RSA public key

Return Value
A CRSAPublicKey object