Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.math.BigInteger;
import java.security.SecureRandom;

public class Main {
    public static void main(String[] args) throws Exception {
        int bitLength = 512; // 512 bits
        SecureRandom rnd = new SecureRandom();
        int certainty = 90; // 1 - 1/2(90) certainty
        BigInteger mod = new BigInteger(bitLength, certainty, rnd);

        System.out.println(mod);
    }
}