public override bool Equals(object obj)
        {
            if (obj == this)
            {
                return(true);
            }

            DsaPublicKeyParameters other = obj as DsaPublicKeyParameters;

            if (other == null)
            {
                return(false);
            }

            return(Equals(other));
        }
Beispiel #2
0
		public static AsymmetricCipherKeyPair GetDsaKeyPair(
			DSAParameters dp)
		{
			DsaValidationParameters validationParameters = (dp.Seed != null)
				?	new DsaValidationParameters(dp.Seed, dp.Counter)
				:	null;

			DsaParameters parameters = new DsaParameters(
				new BigInteger(1, dp.P),
				new BigInteger(1, dp.Q),
				new BigInteger(1, dp.G),
				validationParameters);

			DsaPublicKeyParameters pubKey = new DsaPublicKeyParameters(
				new BigInteger(1, dp.Y),
				parameters);

			DsaPrivateKeyParameters privKey = new DsaPrivateKeyParameters(
				new BigInteger(1, dp.X),
				parameters);

			return new AsymmetricCipherKeyPair(pubKey, privKey);
		}
 protected bool Equals(
     DsaPublicKeyParameters other)
 {
     return(y.Equals(other.y) && base.Equals(other));
 }
		protected bool Equals(
			DsaPublicKeyParameters other)
		{
			return y.Equals(other.y) && base.Equals(other);
		}