Code example for KeyPair

0
java.security.spec.ECParameterSpec p = (java.security.spec.ECParameterSpec)ecParams;
 
                BCECPublicKey pubKey = new BCECPublicKey(algorithm, pub, p, configuration);
                 
                return new KeyPair(pubKey, new BCECPrivateKey(algorithm, priv, pubKey, p, configuration));
            } 
        } 
    } 
 
    public static class ECDSA 
        extends EC 
    { 
        public ECDSA() 
        { 
            super("ECDSA", BouncyCastleProvider.CONFIGURATION); 
        } 
    } 
 
    public static class ECDH 
        extends EC