Share via


BigInteger.ProbablePrime(Int32, Random) Method

Definition

Returns a positive BigInteger that is probably prime, with the specified bitLength.

[Android.Runtime.Register("probablePrime", "(ILjava/util/Random;)Ljava/math/BigInteger;", "")]
public static Java.Math.BigInteger ProbablePrime (int bitLength, Java.Util.Random rnd);
[<Android.Runtime.Register("probablePrime", "(ILjava/util/Random;)Ljava/math/BigInteger;", "")>]
static member ProbablePrime : int * Java.Util.Random -> Java.Math.BigInteger

Parameters

bitLength
Int32

bitLength of the returned BigInteger.

rnd
Random

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

Returns

a BigInteger of bitLength bits that is probably prime

Attributes

Exceptions

if bitLength .

Remarks

Java documentation for java.math.BigInteger.probablePrime(int, java.util.Random).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to