Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IKMIPClient3::MAC2 ( P6KMIP_SIGNPARAMS  macParams,
P6KMIP_CRYPTOSTREAM pStreamState,
P6KMIP_SIGNOUT pCipherText,
P6KMIP_RESULT pResult 
)
pure virtual

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

The streaming operation generates a MAC over a data stream passed in the macParams parameter over several successful calls to this same function. Chunks of the MAC 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
macParams[ in ] all the parameters required by a MAC operation
pStreamState[ in ] optional can be NULL, the current state of the crypto stream operation (i.e., initial, update, final)
pCipherText[ out ] contains the MAC calculated 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::eExistsif pStreamState != NULL, then encryptParams.cipherOp.pParams and encryptParams.cipherOp.IV.pString should only be set for KMIP_STREAM_INITIAL