Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IEncryptEnvelope::encryptEnvelope ( P6CRYPTODATASOURCE pInData,
P6CRYPTODATASINK pOutData 
)
pure virtual

Using the symetric key generated by calling genSessionKey encrypt the block of data provided by the data source (pInData).

Write the resulting encrypted block to the data sink.

The single, generated symetric key is encrypted (or sealed) with each loaded RSA public key. Each of these sealed keys are stored in the P6CRYPTODATASINK associated with the public key that was passed in on the loadRSAPublicKey call.

Parameters
pInData[ in ] Generate a signature for this input data.
pOutData[ in ] Pointer to where to copy the signature value.
Returns
SuccessP6R::eOk 
FailureP6R::eNotInitializedA successful call to initialize was not made before this call.
P6R::eInvalidStateloadRSAPublicKey has not been successfully invoked at least once.
P6R::eInvalidArgOne of the parameters is NULL.
P6R::eNotFoundFile data source does not exist.
P6R::eInvalidDescriptorThe requested cipher and key size is not supported.
P6R::eIoErrorWrite to file data sink failed.
P6R::eTooSmallThe buffer data sink is too small to contain the generated value.
P6R::eNoMemory/td>Insufficent memory for buffering.
P6R::eInvalidState/td>Internal error
P6R::eFailAndExceptionThe encryption calculation failed. Exception record provides detailed error info.