Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IKMIPClient3::decrypt2 ( P6KMIP_ENCRYPTPARAMS  decryptParams,
P6KMIP_CRYPTOSTREAM pStreamState,
P6KMIP_CRYPTOOUT pClearText,
P6KMIP_RESULT pResult 
)
pure virtual

Request the server to decrypt data passed in the decryptParams parameter with a selected key (a KMIP 1.2 function).

If a non-NULL P6KMIP_CRYPTOSTREAM is passed into this function, then the caller is requesting the streaming version of the operation (added to KMIP 1.3). A NULL value for the P6KMIP_CRYPTOSTREAM parameter results in the non-streaming decrypt operation.

The streaming operation decrypts a data stream passed in the decryptParams parameter over several successful calls to this same function. Chunks of the decrypted stream can be returned from each call via the pCipherText parameter.

Note, that the streaming version of this operation, by definition, is only synchronous. For the streaming operation, if a value is returned in the P6KMIP_RESULT.pAsynchCorrelation field, then that handle identifies the crypto stream and needs to be passed in subsequent calls to this function in the P6KMIP_CRYPTOSTREAM.correlationValue field.

Parameters
decryptParams[ in ] all the parameters required by a decrypt operation
pStreamState[ in ] optional can be NULL, the current state of the crypto stream operation (i.e., initial, update, final)
pClearText[ out ] contains the decrypted data
pResult[ out ] Server returned status indicators
Returns
FailureP6R::eNotInitializedA successful call to initialize() is required.
P6R::eNotConnA successful call to open() is required before this function is called.
P6R::eInvalidArgOne of the pointers is NULL.
P6R::eFormatErrorParsing error occurred while parsing a KMIP server response.
P6R::eTooBigMessage returned by server is too big to fit in configured buffers.
P6R::eTooSmallThe configured buffer size in P6KMIP_PREF.maxBufferSize is too small to hold the request message.
P6R::eInvalidArgInvalid streamState parameter settings.
P6R::eUnsupportedThe 'decryptParams.cipherOp.data' parameter can be empty only on the final state of a streaming request.
P6R::eExistsif pStreamState != NULL, then encryptParams.cipherOp.pParams and encryptParams.cipherOp.IV.pString should only be set for KMIP_STREAM_INITIAL