[#BloombergLP-bdlb-RandomDevice-getRandomBytes] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/RandomDevice.adoc[RandomDevice]::getRandomBytes :relfileprefix: ../../../ :mrdocs: Load random bytes from the system random number generator. == Synopsis Declared in `<bdlb_randomdevice.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int getRandomBytes( unsigned char* buffer, xref:BloombergLP/bdlb/RandomDevice/size_t.adoc[size_t] numBytes); ---- == Description 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. == Return Value 0 on success, and a non‐zero value otherwise == Parameters [cols="1,4"] |=== | Name| Description | *buffer* | buffer to receive the random bytes | *numBytes* | number of bytes to read into `buffer` |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#