throw new InvalidAlgorithmParameterException("parameter object not a DHParameterSpec or an ElGamalParameterSpec");
}
if (params instanceof ElGamalParameterSpec)
{
ElGamalParameterSpec elParams = (ElGamalParameterSpec)params;
param = new ElGamalKeyGenerationParameters(random, new ElGamalParameters(elParams.getP(), elParams.getG()));
}
else
{
DHParameterSpec dhParams = (DHParameterSpec)params;