AlgorithmParameterSpec paramSpec)
throws InvalidParameterSpecException
{
if (!(paramSpec instanceof ElGamalParameterSpec) && !(paramSpec instanceof DHParameterSpec))
{
throw new InvalidParameterSpecException("DHParameterSpec required to initialise a ElGamal algorithm parameters object");
}
if (paramSpec instanceof ElGamalParameterSpec)
{
this.currentSpec = (ElGamalParameterSpec)paramSpec;