Computes the MAC value without destroying or changing the state of the MAC context.
#include "humac.h"
int hu_MACTagGet(sb_Context macContext, size_t *tagLen, unsigned char *tag, sb_GlobalCtx sbCtx)
BlackBerry 10.0.0
The MAC context object.
The length (in bytes) of the tag.
The MAC output.
A global context.
To specify the length of the tag value, a pointer to a buffer large enough to hold the tag value should be passed in tag and its length in tagLen. This function will copy the first tagLen bytes of the computed tag into tag. If tagLen is greater than the default tag length, the entire tag value is copied, and the default length of the tag value is set in tagLen.
If tag is NULL, then this function will set the default length of the tag value in tagLen. If tag is not NULL but tagLen is too small, this function will return an error and will also set the default length of the tag value in tagLen.
For HMAC algorithms, the default length of the tag value is the underlying digest's output length. The minimum length of the tag value is half the default length.
The macContext object is NULL.
The macContext object is invalid.
The tagLen pointer is NULL.
The tagLen value is too small.