Creates an DRBG RNG context object with optional personalized String.
#include "hurandom.h"
int hu_RngDrbgCreate(int algId, int securityStrength, int predictiveResistanceFlag, size_t personalizedStringLen, const unsigned char *personalizedString, sb_YieldCtx yieldCtx, sb_RNGCtx *rngCtx, sb_GlobalCtx sbCtx)
BlackBerry 10.0.0
DRBG algorithm Identifier. The acceptable values are HU_DRBG_CIPHER, HU_DRBG_EC, HU_DRBG_EC_CERTICOM, HU_DRBG_HASH, and HU_DRBG_HMAC.
Security strength in bits; must be less than or equal to 256. While you can specify any number between 0 and 256, inclusive; internally the value will be rounded up to the four supported strengths: 112, 128, 192, 256.
Future use; set to zero.
The length (in bytes) of personalized string. (Optional - set to zero if not used.)
The intent of the personalization string is to differentiate this DRBG instance from all other instantiations that might be created. It should be set to some bitstring as unique as possible. Examples include: device serial number, public key, user identification, timestamps, network address, application identifiers, protocol version identifiers, random number and nonce. (Optional - set to NULL if not used.)
A yield context. (Optional - set to NULL if not used.)
An RNG context object pointer.
A global context.
The DRBG algorithm identifier is unknown.
The RNG context object pointer is NULL.
Memory allocation failure.
Success.