Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.security.KeyPair;
import java.security.KeyPairGenerator;

public class Main {

    public static void main(String[] args) throws Exception {
        String algorithm = "";
        KeyPair keyPair = KeyPairGenerator.getInstance(algorithm).generateKeyPair();

        System.out.println(keyPair.getPublic());
        System.out.println(keyPair.getPrivate());

    }
}