[#RAND_set_rand_engine]
= RAND&lowbar;set&lowbar;rand&lowbar;engine
:mrdocs:

Select an ENGINE as the source of the legacy RAND&lowbar;METHOD (deprecated)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;deprecated&rsqb;&rsqb;
int
RAND&lowbar;set&lowbar;rand&lowbar;engine(xref:ENGINE.adoc[ENGINE]* engine);
----

[WARNING]
====
https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]. Use of this entity is allowed but discouraged.
====
== Description

Deprecated in OpenSSL 3&period;0&semi; prefer EVP&lowbar;RAND &sol; provider&hyphen;based DRBGs&period;

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *engine*
| ENGINE providing a RAND implementation, or NULL to clear&period;
|===


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