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


2 answers


probablePrime

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



+1


source


Update notes to the latest version.



0


source







All Articles