Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IDecryptEnvelope::setKey ( p6ICryptoKey pCryptoKey,
P6CRYPTODATASOURCE pInKeyWrapper 
)
pure virtual

Load RSA Private key from a file on disk and the session key wrapper into the p6crypto component.

Only RSA keys are allowed for session key distribution.

It is possible to do multiple decryptions with this one object. The calling sequeuence of <loadRSAPrivateKey, decryptEnvelope> ... <loadRSAPrivateKey, decryptEnvelope>, is supported.

Parameters
pCryptoKey[ in ] A pointer to a p6ICryptoKey interface that contains the key to set.
pInKeyWrapper[ in ] Points the ASN.1 encoded key wrapper that contains an encrypted session key and encrypted key profile (i.e., key size, IV, cipher). See the associated documentation on PKI Support. This value is the output of p6IEncryptEnvelope::encryptEnvelope.
Returns
SuccessP6R::eOk 
FailureP6R::eInvalidArgEither pPrivateKeyFile is NULL or pInData is and invalid data source.
P6R::eNotInitializedA successful call to initialize was not made before this call.
P6R::eNotFoundCould not open the private key file.
P6R::eNotFoundA data source file cannot be openned.
P6R::eNoMemoryInsufficient memory to load the private key.
P6R::eFormatErrorCannot parse the key wrapper.