[#BloombergLP-bdlb-RandomDevice-getRandomBytes] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/RandomDevice.adoc[RandomDevice]::getRandomBytes :relfileprefix: ../../../ :mrdocs: 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>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int getRandomBytes( unsigned char* buffer, xref:BloombergLP/bdlb/RandomDevice/size_t.adoc[size_t] numBytes); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#