def randomZ(maximum=None, bits=<NUM_LIT>):
result = BigInt()<EOL>if maximum:<EOL><INDENT>maximum = coerceBigInt(maximum)<EOL>librelic.bn_rand_mod(byref(result), byref(maximum))<EOL><DEDENT>else:<EOL><INDENT>librelic.bn_rand_abi(byref(result), BigInt.POSITIVE_FLAG, c_int(bits))<EOL><DEDENT>return result<EOL>
Retrieve a random BigInt.
@maximum: If specified, the value will be no larger than this modulus.
@bits: If no maximum is specified, the value will have @bits.