I need to have random Big Integers for checking if number is prime (there is a method that does that), but this numbers must start from 264. There is an answer in stack overflow how to random BigIntegers from x to y, but i don't know how to put 264 in this method. Is there any way?
BigInteger randomNumber;
do {
randomNumber = new BigInteger(upperLimit.bitLength(), randomSource);
} while (randomNumber.compareTo(upperLimit) >= 0);
I expect the output to be from 18 446 744 073 709 551 616 to any bigger available.