[#InsecureRandomContext-randbytes-0e]
= xref:InsecureRandomContext.adoc[InsecureRandomContext]::randbytes
:relfileprefix: ../
:mrdocs:

`randbytes` overloads

== Synopses

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

Generate fixed&hyphen;size random bytes&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    size&lowbar;t N,
    xref:BasicByte.adoc[BasicByte] B = std::byte&gt;
std::array&lt;B, N&gt;
xref:InsecureRandomContext/randbytes-0b.adoc[randbytes]() noexcept;
----

[.small]#xref:InsecureRandomContext/randbytes-0b.adoc[_» more&period;&period;&period;_]#

Generate random bytes&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;xref:BasicByte.adoc[BasicByte] B = unsigned char&gt;
std::vector&lt;B&gt;
xref:InsecureRandomContext/randbytes-07.adoc[randbytes](size&lowbar;t len) noexcept;
----

[.small]#xref:InsecureRandomContext/randbytes-07.adoc[_» more&period;&period;&period;_]#

== Return Value

* An array of `N` random bytes&period;
* A vector of `len` random bytes&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *len*
| The number of random bytes to generate&period;
|===


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