Code example for DHParameterSpec

0
 
            AlgorithmParameters params;
 
            try 
            { 
                params = AlgorithmParameters.getInstance("DH", BouncyCastleProvider.PROVIDER_NAME);
                params.init(new DHParameterSpec(p.getP(), p.getG(), l));
            } 
            catch (Exception e)
            { 
                throw new RuntimeException(e.getMessage());
            } 
 
            return params;
        } 
    } 
 
    public static class DSA 
        extends JDKAlgorithmParameterGenerator 
    { 
        protected void engineInit(