[#BloombergLP-bdlb-RandomDevice-getRandomBytesNonBlocking]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/RandomDevice.adoc[RandomDevice]::getRandomBytesNonBlocking
:relfileprefix: ../../../
:mrdocs:

Load random bytes from the system non&hyphen;blocking random number generator&period;

== Synopsis

Declared in `&lt;bdlb&lowbar;randomdevice&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
getRandomBytesNonBlocking(
    unsigned char* buffer,
    xref:BloombergLP/bdlb/RandomDevice/size_t.adoc[size&lowbar;t] numBytes);
----

== Description

Read the specified `numBytes` from the system non&hyphen;blocking random number generator into the specified `buffer`&period; Note that the cryptographic strength of samples drawn from this pool may or may not be lower than that of those drawn from the blocking pool, and may vary by platform&period;

== Return Value

0 on success, and a non&hyphen;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]#
