hu_HMACSHA1End()

Completes the HMAC operation by generating a MAC tag of the specified length for the given data and destroying the HMAC-SHA-1 context.

Synopsis:

#include "husha1.h"
 
int hu_HMACSHA1End(sb_Context *hmacContext, size_t tagLen, unsigned char *tag, sb_GlobalCtx sbCtx)

Since:

BlackBerry 10.0.0

Arguments:

hmacContext

The HMAC-SHA-1 context object pointer.

tagLen

The length (in bytes) of MAC tag. This value must be between SB_HMAC_SHA1_80_TAG_LEN and SB_HMAC_SHA1_160_TAG_LEN inclusive.

tag

The MAC tag buffer.

sbCtx

A global context.

Library:

libhuapi (For the qcc command, use the -l huapi option to link against this library)

Description:

Returns:

SB_ERR_NULL_CONTEXT_PTR

The hmacContext object pointer is NULL.

SB_ERR_NULL_CONTEXT

The hmacContext object is NULL.

SB_ERR_BAD_CONTEXT

The hmacContext object is invalid.

SB_ERR_BAD_OUTPUT_BUF_LEN

The tag buffer length is invalid.

SB_ERR_NULL_OUTPUT_BUF

The tag buffer is NULL.

SB_SUCCESS

Success.