[#GetRandBytes]
= GetRandBytes
:mrdocs:

Generate random data via the internal PRNG&period;

== Synopsis

Declared in `&lt;random&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
GetRandBytes(std::span&lt;unsigned char&gt; bytes) noexcept;
----

== Description

These functions are designed to be fast (sub microsecond), but do not necessarily meaningfully add entropy to the PRNG state&period;

In test mode (see SeedRandomForTest in src&sol;test&sol;util&sol;random&period;h), the normal PRNG state is bypassed, and a deterministic, seeded, PRNG is used instead&period;

Thread&hyphen;safe&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *bytes*
| The output buffer to fill with random data&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
