BloombergLP::bdlb::RandomDevice::getRandomBytes

Read the specified numBytes from the system random number generator into the specified buffer. Returns 0 on success, non-zero otherwise. Note that this method may block if called repeatedly or if numBytes is high.

Synopsis

Declared in <bdlb_randomdevice.h>

static
int
getRandomBytes(
    unsigned char* buffer,
    size_t numBytes);