public ElGamalKeyGenerationParameters(
     SecureRandom		random,
     ElGamalParameters	parameters)
     : base(random, GetStrength(parameters))
 {
     this.parameters = parameters;
 }
 protected ElGamalKeyParameters(
     bool				isPrivate,
     ElGamalParameters	parameters)
     : base(isPrivate)
 {
     // TODO Should we allow 'parameters' to be null?
     this.parameters = parameters;
 }
        public ElGamalPublicKeyParameters(
            BigInteger			y,
            ElGamalParameters	parameters)
            : base(false, parameters)
        {
            if (y == null)
                throw new ArgumentNullException("y");

            this.y = y;
        }
        public ElGamalPrivateKeyParameters(
            BigInteger			x,
            ElGamalParameters	parameters)
            : base(true, parameters)
        {
            if (x == null)
                throw new ArgumentNullException("x");

            this.x = x;
        }
 internal static int GetStrength(
     ElGamalParameters parameters)
 {
     return parameters.L != 0 ? parameters.L : parameters.P.BitLength;
 }
 protected bool Equals(
     ElGamalParameters other)
 {
     return p.Equals(other.p) && g.Equals(other.g) && l == other.l;
 }