nextBigInteger method

  1. @override
BigInt nextBigInteger(
  1. int bitLength
)
override

Get a random BigInteger of bitLength bits.

Implementation

@override
BigInt nextBigInteger(int bitLength) {
  return BigInt.parse(
      Iterable.generate(bitLength, (_) => random.nextBool() ? '1' : '0')
          .join(''),
      radix: 2);
}