MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

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

public class MainClass {

    public static void main(String[] args) throws Exception {

        KeyPairGenerator kpg = KeyPairGenerator.getInstance("DSA");
        kpg.initialize(1024, new SecureRandom());
        KeyPair dsaKeyPair = kpg.generateKeyPair();

    }
}