probablePrime

Returns a positive BigInteger that is probably prime, with the specified bitLength. The probability that a BigInteger returned by this method is composite does not exceed 2-100.

Return

a BigInteger of bitLength bits that is probably prime

Since

1.4

Parameters

bitLength

bitLength of the returned BigInteger.

rnd

source of random bits used to select candidates to be tested for primality.

See also

Throws

bitLength < 2 or bitLength is too large.