Using probablePrime to generate a prime number. probablePrime (512, randomSeed);
I am trying to generate a random prime using the probablePrime method of the BigInteger class. this is the 6.5 agent for Lotus Notes that I am trying to work with.
import java.math.BigInteger;
import java.security.SecureRandom;
import java.util.Random;
public class RSA{
public static BigInteger genPrimeNum(int bitlen, Random random){
return BigInteger.probablePrime(bitlen, random);
}
}
On compilation, I get an error about the probablePrime (int, java.util.Random) method not found in the BigInteger class
Please, help.
Thanks in advance!
+3
source to share