-2
나는이 코드를 사용하고 있는데, 넷빈에서 잘 돌아갈 수는 있지만, 안드로이드 프로젝트에서 일식을 시도했을 때 작동하지 않는다. 무작위로 공개 키를 가져오고 싶지만 결과는 항상 "35879"입니다.안드로이드에서 BigInteger.probablePrime을 임의로 생성하는 방법은 무엇입니까?
publicKey = BigInteger.probablePrime(10, new Random());
while (phi.gcd(publicKey).compareTo(BigInteger.ONE) > 0 && publicKey.compareTo(phi) < 0) {
publicKey.add(BigInteger.ONE);
}