[#BloombergLP-bdlb-GuidUtil-generateNonSecure-0f]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/GuidUtil.adoc[GuidUtil]::generateNonSecure
:relfileprefix: ../../../
:mrdocs:

Generate non&hyphen;cryptographic RFC 4122 version 4 GUIDs into the specified array&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
void
generateNonSecure(
    xref:BloombergLP/bdlb/Guid.adoc[Guid]* result,
    std::size&lowbar;t numGuids = 1);
----

== Description

Generate a sequence of GUIDs meeting the RFC 4122 version 4 specification, and load the resulting GUIDs into the array referred to by the specified `result`&period; Optionally specify `numGuids`, indicating the number of GUIDs to load into the `result` array&period; If `numGuids` is not supplied, a default of 1 is used&period; An RFC 4122 version 4 GUID consists of 122 randomly generated bits, two &quot;variant&quot; bits set to `10`, and four &quot;version&quot; bits set to `0100`&period; The behavior is undefined unless `result` refers to a contiguous sequence of at least `numGuids` `Guid` objects&period; Note that this function generates high quality, albeit not cryptographically secure, random numbers for GUIDs&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *result*
| array of `Guid` objects to populate
| *numGuids*
| number of GUIDs to generate (1 if not specified)
|===


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