[#BN_priv_rand_range_ex]
= BN&lowbar;priv&lowbar;rand&lowbar;range&lowbar;ex
:mrdocs:

Generate a private random BIGNUM uniformly in &lsqb;0, &rsqb;`range)` with strength bits&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
BN&lowbar;priv&lowbar;rand&lowbar;range&lowbar;ex(
    xref:BIGNUM.adoc[BIGNUM]* r,
    xref:BIGNUM.adoc[BIGNUM] const* range,
    unsigned int strength,
    xref:BN_CTX.adoc[BN&lowbar;CTX]* ctx);
----

== Return Value

1 on success, or 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *r*
| Destination for the random value&period;
| *range*
| Exclusive upper bound (must be positive)&period;
| *strength*
| Requested security strength in bits for the DRBG draw&period;
| *ctx*
| BN&lowbar;CTX scratch, or NULL&period;
|===


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