BN_bntest_rand

Generate a non-cryptographic test random BIGNUM for BN self-tests.

Synopsis

Declared in <openssl/bn.h>

int
BN_bntest_rand(
    BIGNUM* rnd,
    int bits,
    int top,
    int bottom);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
rndDestination BIGNUM.
bitsDesired bit length.
topBN_RAND_TOP_* controlling the most-significant bits.
bottomBN_RAND_BOTTOM_* controlling the least-significant bit.