[#EVP_RAND_CTX_new]
= EVP&lowbar;RAND&lowbar;CTX&lowbar;new
:mrdocs:

Create a RAND context for `rand,` optionally chaining from a parent DRBG&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:EVP_RAND_CTX.adoc[EVP&lowbar;RAND&lowbar;CTX]*
EVP&lowbar;RAND&lowbar;CTX&lowbar;new(
    xref:EVP_RAND.adoc[EVP&lowbar;RAND]* rand,
    xref:EVP_RAND_CTX.adoc[EVP&lowbar;RAND&lowbar;CTX]* parent);
----

== Return Value

New EVP&lowbar;RAND&lowbar;CTX, or NULL on failure&semi; free with EVP&lowbar;RAND&lowbar;CTX&lowbar;free()&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *rand*
| Fetched EVP&lowbar;RAND implementation (reference count is incremented)&period;
| *parent*
| Optional parent EVP&lowbar;RAND&lowbar;CTX used as entropy source, or NULL&period;
|===


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