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.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!


source to share

2 answers


is in Java since version 1.4. Is it possible that your environment is using an earlier version of Java?



Update notes to the latest version.



All Articles