[#InsecureRandomContext-randbits-03]
= xref:InsecureRandomContext.adoc[InsecureRandomContext]::randbits
:relfileprefix: ../
:mrdocs:

`randbits` overloads

== Synopses

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

Same as above, but with compile&hyphen;time fixed bits count&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;int Bits&gt;
uint64&lowbar;t
xref:InsecureRandomContext/randbits-0b.adoc[randbits]() noexcept;
----

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

Generate a random (bits)&hyphen;bit integer&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
uint64&lowbar;t
xref:InsecureRandomContext/randbits-05.adoc[randbits](int bits) noexcept;
----

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

== Return Value

* A random integer whose low `Bits` bits are random and the rest zero&period;
* A random integer whose low `bits` bits are random and the rest zero&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *bits*
| The number of random bits to produce (0 to 64)&period;
|===


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