CRSAPKCS1v15Encryptor Class Reference

class CRSAPKCS1v15Encryptor : public CEncryptor

Implementation of RSA encryption as described in PKCS#1 v1.5.

Inherits from

Constructor & Destructor Documentation

CRSAPKCS1v15Encryptor(const CRSAPublicKey &)

CRSAPKCS1v15Encryptor(const CRSAPublicKey &aKey)[protected]

Parameters

const CRSAPublicKey & aKey

CRSAPKCS1v15Encryptor(const CRSAPKCS1v15Encryptor &)

CRSAPKCS1v15Encryptor(const CRSAPKCS1v15Encryptor &)[private]

Parameters

const CRSAPKCS1v15Encryptor &

~CRSAPKCS1v15Encryptor(void)

~CRSAPKCS1v15Encryptor(void)[virtual]

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

Parameters

void

Member Functions Documentation

ConstructL(void)

voidConstructL(void)[protected]

Parameters

void

EncryptL(const TDesC8 &, TDes8 &)

voidEncryptL(const TDesC8 &aInput,
TDes8 &aOutput
)const [virtual]

Encrypts the specified plaintext into ciphertext.

panic
KCryptoPanic If the input data is too long. See ECryptoPanicInputTooLarge
panic
KCryptoPanic If the supplied output descriptor is not large enough to store the result. See ECryptoPanicOutputDescriptorOverflow

Parameters

const TDesC8 & aInputThe plaintext
TDes8 & aOutputOn return, the ciphertext

MaxInputLength(void)

TInt MaxInputLength(void)const

Parameters

void

MaxOutputLength(void)

TInt MaxOutputLength(void)const

Parameters

void

NewL(const CRSAPublicKey &)

IMPORT_C CRSAPKCS1v15Encryptor *NewL(const CRSAPublicKey &aKey)[static]

Creates a new RSA encryptor object using PKCS#1 v1.5 padding.

leave
KErrKeyNotWeakEnough If the key size is larger than that allowed by the cipher strength restrictions of the crypto library. See TCrypto::IsAsymmetricWeakEnoughL()
leave
KErrKeySize If the key length is too small

Parameters

const CRSAPublicKey & aKeyThe RSA encryption key

NewLC(const CRSAPublicKey &)

IMPORT_C CRSAPKCS1v15Encryptor *NewLC(const CRSAPublicKey &aKey)[static]

Creates a new RSA encryptor object using PKCS#1 v1.5 padding.

The returned pointer is put onto the cleanup stack.

leave
KErrKeyNotWeakEnough If the key size is larger than that allowed by the cipher strength restrictions of the crypto library. See TCrypto::IsAsymmetricWeakEnoughL()
leave
KErrKeySize If the key length is too small

Parameters

const CRSAPublicKey & aKeyThe RSA encryption key

operator=(const CRSAPKCS1v15Encryptor &)

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

Parameters

const CRSAPKCS1v15Encryptor &

Member Data Documentation

CPaddingPKCS1Encryption * iPadding

CPaddingPKCS1Encryption *iPadding[protected]

The PKCS#1 v1.5 encryption padding

const CRSAPublicKey & iPublicKey

const CRSAPublicKey &iPublicKey[protected]

The RSA public key