[#BN_bntest_rand]
= BN&lowbar;bntest&lowbar;rand
:mrdocs:

Generate a non&hyphen;cryptographic test random BIGNUM for BN self&hyphen;tests&period;

== Synopsis

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

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

== 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 the least&hyphen;significant bit&period;
|===


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