[#EVP_RAND_instantiate]
= EVP&lowbar;RAND&lowbar;instantiate
:mrdocs:

Instantiate (seed) an EVP&lowbar;RAND&lowbar;CTX so it can generate random bytes&period;

== Synopsis

Declared in `&lt;openssl&sol;evp&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;RAND&lowbar;instantiate(
    xref:EVP_RAND_CTX.adoc[EVP&lowbar;RAND&lowbar;CTX]* ctx,
    unsigned int strength,
    int prediction&lowbar;resistance,
    unsigned char const* pstr,
    size&lowbar;t pstr&lowbar;len,
    xref:OSSL_PARAM.adoc[OSSL&lowbar;PARAM] const params[]);
----

== Return Value

1 on success, or 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| RNG context to instantiate&period;
| *strength*
| Requested security strength in bits&period;
| *prediction&lowbar;resistance*
| Non&hyphen;zero to force a reseed from live entropy&period;
| *pstr*
| Optional personalization string, or NULL&period;
| *pstr&lowbar;len*
| Length of `pstr` in bytes&period;
| *params*
| Optional OSSL&lowbar;PARAM array of additional parameters, or NULL&period;
|===


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