BN_rand_range

Generate a cryptographically strong uniform public random BIGNUM in [0, ]range).

Synopsis

Declared in <openssl/bn.h>

int
BN_rand_range(
    BIGNUM* rnd,
    BIGNUM const* range);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
rndDestination for the random value.
rangeExclusive upper bound; must be positive.