[#BloombergLP-bslh-SeedGenerator-generateSeed]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslh.adoc[bslh]::xref:BloombergLP/bslh/SeedGenerator.adoc[SeedGenerator]::generateSeed
:relfileprefix: ../../../
:mrdocs:

Generate a seed of the specified length and store it at the specified location&period;

== Synopsis

Declared in `&lt;bslh&lowbar;seedgenerator&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
generateSeed(
    char* seedLocation,
    size&lowbar;t seedLength);
----

== Description

Generate a seed of the specified `seedLength` bytes and store it at the specified `seedLocation`&period; The seed will be generated with bytes from the random number generator supplied at construction&period; All of the returned bytes will come from the RNG, meaning if the requested seed is larger than the return type of the RNG, the RNG will be called multiple times&period; The behaviour is undefined unless the memory at `seedLocation` can store `seedLength` bytes&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *seedLocation*
| memory at which to store the generated seed
| *seedLength*
| number of bytes of seed to generate
|===


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