[#RAND_set0_public]
= RAND&lowbar;set0&lowbar;public
:mrdocs:

Install `rand` as the public DRBG for a library context, transferring ownership&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
RAND&lowbar;set0&lowbar;public(
    xref:OSSL_LIB_CTX.adoc[OSSL&lowbar;LIB&lowbar;CTX]* ctx,
    xref:EVP_RAND_CTX.adoc[EVP&lowbar;RAND&lowbar;CTX]* rand);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Library context whose public RNG is replaced, or NULL for the default&period;
| *rand*
| RAND context that becomes the public generator&semi; `ctx` takes ownership&period;
|===


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