For ANSI and FIPS140 ANSI RNGs, this function updates the RNG context object with the given seed data and generates random data of the specified length.
#include "hurandom.h"
int hu_RngReseedGetBytes(sb_RNGCtx rngCtx, size_t seedLen, const unsigned char *seed, size_t bufSize, unsigned char *buf, sb_GlobalCtx sbCtx)
BlackBerry 10.0.0
An RNG context object.
The length (in bytes) of seed.
The seed value.
The length (in bytes) of random data buffer.
Random data.
A global context.
For cipher, hash, HMAC and EC DRBG RNGs, this function uses the given 'seed' data as an additional input into the generation of random data of the specified length. It does not gather entropy to do a full reseed of the DRBG RNG context. To do a full reseed of the DRBG RNG context use hu_RngReseed().
Reseeding the RNG context with whatever new entropy is collected is excellent practice.
The RNG context object is NULL.
The RNG context object is invalid.
The output buffer is NULL.
The length of the output buffer is invalid.
A FIPS 140-1/2 condition failed.
The seed (additional input for DRBG) is too long.
Success.