in source/sigv4.c [2558:2592]
static int32_t completeHmac( HmacContext_t * pHmacContext,
const char * pKey,
size_t keyLen,
const char * pData,
size_t dataLen,
char * pOutput,
size_t outputLen )
{
int32_t returnStatus = 0;
assert( pHmacContext != NULL );
assert( pKey != NULL );
assert( keyLen > 0U );
assert( pData != NULL );
assert( dataLen > 0U );
assert( pOutput != NULL );
assert( outputLen >= pHmacContext->pCryptoInterface->hashDigestLen );
returnStatus = hmacAddKey( pHmacContext,
pKey,
keyLen,
false /* Not a key prefix. */ );
if( returnStatus == 0 )
{
returnStatus = hmacIntermediate( pHmacContext, pData, dataLen );
}
if( returnStatus == 0 )
{
returnStatus = hmacFinal( pHmacContext, pOutput, outputLen );
}
return returnStatus;
}