if (params instanceof ElGamalParameterSpec)
{
ElGamalParameterSpec elParams = (ElGamalParameterSpec)params;
param = new ElGamalKeyGenerationParameters(random, new ElGamalParameters(elParams.getP(), elParams.getG()));
}
else
{
DHParameterSpec dhParams = (DHParameterSpec)params;
param = new ElGamalKeyGenerationParameters(random, new ElGamalParameters(dhParams.getP(), dhParams.getG(), dhParams.getL()));
}
engine.init(param);
initialised = true;
}