Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IKMIPClient3::hash2 ( P6KMIP_CRYPTOPARAMS  cParams,
P6BCSTR  data,
P6KMIP_CRYPTOSTREAM pStreamState,
P6KMIP_MSGEXTENSION pExtension,
p6IKMIPBinary **  pHash,
P6KMIP_RESULT pResult 
)
pure virtual

Request the server to calculate a hash over data passed in the data 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 hash operation.

The streaming operation calculates a hash over a data stream passed in the data parameter over several successful calls to this same function. Chunks of the hash 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
cParams[ in ] define hashing algorithm to be used
data[ in ] generate a hash with this data as input
pStreamState[ in ] optional can be NULL, the current state of the crypto stream operation (i.e., initial, update, final)
pExtension[ in ] optional can be NULL, vendor defined extension to the operation
pHash[ out ] the calculated hash value (as a byte string)
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::eInvalidArgpHash, or pResult 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 'data' parameter can be empty only on the final state of a streaming request.
P6R::eExistsif pStreamState != NULL, then encryptParams.pParams and encryptParams.IV.pString should only be set for KMIP_STREAM_INITIAL