Creates a key object for the specified MAC algorithm from random data.
#include "humac.h"
int hu_MACKeyGen(int macAlgId, sb_RNGCtx rngCtx, sb_Key *macKey, sb_GlobalCtx sbCtx)
BlackBerry 10.0.0
The MAC algorithm identifier.
An RNG context.
The MAC key object pointer.
A global context.
macAlgId should be one of the algorithm identifiers defined in this file (e.g. HU_DIGEST_SHA1, HU_MAC_XCBC_AES).
For HMAC algorithms, the length of the generated key will be the digest output length (the minimum recommended in RFC 2104).
For cipher-based MAC algorithms, the length of the generated key will be the length for a key of the underlying cipher.
macAlgId is unknown.
macKey is NULL.