CRSAPKCS1v15Encryptor Class Reference

#include <asymmetric.h>

class CRSAPKCS1v15Encryptor : public CEncryptor

Inherits from

Detailed Description

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

Member Attribute Documentation

iPadding

CPaddingPKCS1Encryption *iPadding[protected]

The PKCS#1 v1.5 encryption padding

iPublicKey

const CRSAPublicKey &iPublicKey[protected]

The RSA public key

Constructor & Destructor Documentation

CRSAPKCS1v15Encryptor ( const CRSAPublicKey & )

CRSAPKCS1v15Encryptor(const CRSAPublicKey &aKey)[protected]

~CRSAPKCS1v15Encryptor ( void )

~CRSAPKCS1v15Encryptor(void)[virtual]

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

Member Function Documentation

ConstructL ( void )

voidConstructL(void)[protected]

EncryptL ( const TDesC8 &, TDes8 & )

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

Encrypts the specified plaintext into ciphertext.

Parameters
aInputThe plaintext
aOutputOn return, the ciphertext
Panic Codes
KCryptoPanicIf the input data is too long. See ECryptoPanicInputTooLarge
KCryptoPanicIf the supplied output descriptor is not large enough to store the result. See ECryptoPanicOutputDescriptorOverflow

MaxInputLength ( void )

TInt MaxInputLength(void)const [virtual]

Gets the maximum size of input accepted by this object.

Return Value
The maximum input length allowed in bytes.

MaxOutputLength ( void )

TInt MaxOutputLength(void)const [virtual]

Gets the maximum size of output that can be generated by this object.

Return Value
The maximum output length in bytes.

NewL ( const CRSAPublicKey & )

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

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

Parameters
aKeyThe RSA encryption key
Return Value
A pointer to a new CRSAPKCS1v15Encryptor object
Leave Codes
KErrKeyNotWeakEnoughIf the key size is larger than that allowed by the cipher strength restrictions of the crypto library. See
KErrKeySizeIf the key length is too small

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.

Parameters
aKeyThe RSA encryption key
Return Value
A pointer to a new CRSAPKCS1v15Encryptor object
Leave Codes
KErrKeyNotWeakEnoughIf the key size is larger than that allowed by the cipher strength restrictions of the crypto library. See
KErrKeySizeIf the key length is too small