CRSAKeyPair Class Reference

#include <asymmetrickeys.h>

class CRSAKeyPair : public CBase

Inherits from

  • CRSAKeyPair

    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

    leave
    KErrNotSupported If the type of RSA key is not supported
    ParameterDescription
    aModulusBitsThe length of the modulus, n (in bits)
    aKeyTypeThe type of the RSA key

    Returns: A pointer to a new CRSAKeyPair object

    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
    ParameterDescription
    aModulusBitsThe length of the modulus, n (in bits)
    aKeyTypeThe type of the RSA key

    Returns: A pointer to a new CRSAKeyPair object

    PrivateKey ( void )

    IMPORT_C const CRSAPrivateKey &PrivateKey(void)const

    Gets the RSA private key

    Returns: A CRSAPrivateKey object

    PublicKey ( void )

    IMPORT_C const CRSAPublicKey &PublicKey(void)const

    Gets the RSA public key

    Returns: A CRSAPublicKey object