Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IEncryptEnvelope::addKey ( p6ICryptoKey pCryptoKey,
P6CRYPTODATASINK pOutKeyWrapper 
)
pure virtual

Load RSA public key into the p6crypto component.

Only RSA keys are allowed for session key generation. Note, that this function can be called several times, to a maximum of numPubKeys wich was specified in the initialize() method.

Parameters
pCryptoKey[ in ] An RSA key
pOutKeyWrapper[ in ] Write the key wrapper and key profile into this buffer after the encryptEnvelope fucntion is called.
Returns
SuccessP6R::eOk 
FailureP6R::eInvalidArgOne of the parameters is not as expected.
P6R::eNotInitializedA successful call to initialize was not made before this call.
P6R::eEndOfFileThis function already called numPubKeys times (see initialize).
P6R::eNotFoundpPublicKeyFile cannot be openned.
P6R::eNoMemoryInsufficient memory to load key.