Code example for DHParameterSpec

Methods: getGgetLgetP

0
        } 
        else 
        { 
            DHParameterSpec dhParams = (DHParameterSpec)params;
 
            param = new ElGamalKeyGenerationParameters(random, new ElGamalParameters(dhParams.getP(), dhParams.getG(), dhParams.getL()));
        } 
 
        engine.init(param);
        initialised = true;
    } 
 
    public KeyPair generateKeyPair()
    { 
        if (!initialised)
        { 
            DHParameterSpec dhParams = BouncyCastleProvider.CONFIGURATION.getDHDefaultParameters(strength);
 
            if (dhParams != null)
            {