[#BN_pseudo_rand]
= BN&lowbar;pseudo&lowbar;rand
:mrdocs:

Generate a pseudo&hyphen;random BIGNUM (deprecated&semi; prefer BN&lowbar;rand &sol; BN&lowbar;priv&lowbar;rand)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;deprecated&rsqb;&rsqb;
int
BN&lowbar;pseudo&lowbar;rand(
    xref:BIGNUM.adoc[BIGNUM]* rnd,
    int bits,
    int top,
    int bottom);
----

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

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *rnd*
| Destination BIGNUM&period;
| *bits*
| Desired bit length&period;
| *top*
| BN&lowbar;RAND&lowbar;TOP&lowbar;&ast; controlling the most&hyphen;significant bits&period;
| *bottom*
| BN&lowbar;RAND&lowbar;BOTTOM&lowbar;&ast; controlling parity of the least&hyphen;significant bit&period;
|===


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