Code example for KeyPair

0
    } 
 
    public KeyPair generateKeyPair() { 
        PublicKey pubK = (new MyKeyPairGenerator1()).new PubKey(); 
        PrivateKey priK = (new MyKeyPairGenerator1()).new PrivKey(); 
        return new KeyPair(pubK, priK); 
    } 
 
}