hu_RngGetBytesFunc

Prototype of user-provided callback function that generates random data.

Synopsis:

#include "hurandom.h"
 
typedef int SB_CALLBACK_CALLCONV hu_RngGetBytesFunc(void *rngctx, size_t seedlen, const unsigned char *seed, size_t bufsize, unsigned char *buf, void *sbCtx);

Library:

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

Description:

This function is called by hu_RngGetBytes() and hu_RngReseedGetBytes(). It will be passed the rngctx object that was created by the hu_RngInitFunc() callback. This callback may be passed seeding data as well. On completion, you should write bufsize bytes of random data into buf.

This callback should be registered during custom RNG context creation.