Load random bytes from the system random number generator.
Declared in <bdlb_randomdevice.h>
static
int
getRandomBytes(
unsigned char* buffer,
size_t numBytes);
Read the specified numBytes from the system random number generator into the specified buffer. Note that this method may block if called repeatedly or if numBytes is high.
0 on success, and a non-zero value otherwise
| Name | Description |
|---|---|
| buffer | buffer to receive the random bytes |
| numBytes | number of bytes to read into buffer |