[#BN_priv_rand_ex] = BN_priv_rand_ex :mrdocs: Generate a cryptographically strong private random BIGNUM with strength. == Synopsis Declared in `<openssl/bn.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int BN_priv_rand_ex( xref:BIGNUM.adoc[BIGNUM]* rnd, int bits, int top, int bottom, unsigned int strength, xref:BN_CTX.adoc[BN_CTX]* ctx); ---- == Return Value 1 on success, or 0 on failure. == Parameters [cols="1,4"] |=== | Name| Description | *rnd* | Destination BIGNUM (allocated if needed by the implementation). | *bits* | Desired bit length of the result. | *top* | BN_RAND_TOP_* controlling the most‐significant bits. | *bottom* | BN_RAND_BOTTOM_* controlling whether the number must be odd. | *strength* | Requested security strength in bits for the RNG. | *ctx* | BN_CTX for temporary allocations, or NULL. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#