RsaKeyPairGeneratorChooseRandomPrime Method

Choose a random prime value for use with RSA

Definition

Namespace: Org.BouncyCastle.Crypto.Generators
Assembly: BouncyCastle.Cryptography (in BouncyCastle.Cryptography.dll) Version: 2.3.0-beta.187+d6da5648ae
protected virtual BigInteger ChooseRandomPrime(
	int bitlength,
	BigInteger e
)

Parameters

bitlength  Int32
the bit-length of the returned prime
e  BigInteger
the RSA public exponent

Return Value

BigInteger
a prime p, with (p-1) relatively prime to e

See Also