Reputation: 525
I am trying to generate a random prime number using probablePrime method of BigInteger class. this is a lotus notes version 6.5 agent that i am trying to work on.
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);
}
}
When compiling I get error saying method probablePrime(int, java.util.Random) not found in class BigInteger
Please help.
Thanks in advance!!
Upvotes: 3
Views: 892
Reputation: 1500675
probablePrime
has been in Java since version 1.4. Is it possible that your environment uses an earlier version of Java?
Upvotes: 1