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
Success | P6R::eOk | |
Failure | P6R::eInvalidArg | Either pPrivateKeyFile is NULL or pInData is and invalid data source. |
P6R::eNotInitialized | A successful call to initialize was not made before this call. |
P6R::eNotFound | Could not open the private key file. |
P6R::eNotFound | A data source file cannot be openned. |
P6R::eNoMemory | Insufficient memory to load the private key. |
P6R::eFormatError | Cannot parse the key wrapper. |