protected virtual bool Equals(DsaValidationParameters other)
 {
     if (counter == other.counter)
     {
         return(Arrays.AreEqual(seed, other.seed));
     }
     return(false);
 }
Exemplo n.º 2
0
        public override bool Equals(object obj)
        {
            if (obj == this)
            {
                return(true);
            }
            DsaValidationParameters dsaValidationParameters = obj as DsaValidationParameters;

            return(dsaValidationParameters != null && this.Equals(dsaValidationParameters));
        }
Exemplo n.º 3
0
        public override bool Equals(object obj)
        {
            if (obj == this)
            {
                return(true);
            }
            DsaValidationParameters dsaValidationParameters = obj as DsaValidationParameters;

            if (dsaValidationParameters == null)
            {
                return(false);
            }
            return(Equals(dsaValidationParameters));
        }
        public override bool Equals(object obj)
        {
            if (obj == this)
            {
                return(true);
            }
            DsaValidationParameters other = obj as DsaValidationParameters;

            if (other == null)
            {
                return(false);
            }
            return(this.Equals(other));
        }
Exemplo n.º 5
0
		public DsaParameters(
            BigInteger				p,
            BigInteger				q,
            BigInteger				g,
            DsaValidationParameters	parameters)
        {
			if (p == null)
				throw new ArgumentNullException("p");
			if (q == null)
				throw new ArgumentNullException("q");
			if (g == null)
				throw new ArgumentNullException("g");

			this.p = p;
            this.q = q;
			this.g = g;
			this.validation = parameters;
        }
Exemplo n.º 6
0
 public DsaParameters(BigInteger p, BigInteger q, BigInteger g, DsaValidationParameters parameters)
 {
     if (p == null)
     {
         throw new ArgumentNullException("p");
     }
     if (q == null)
     {
         throw new ArgumentNullException("q");
     }
     if (g == null)
     {
         throw new ArgumentNullException("g");
     }
     this.p          = p;
     this.q          = q;
     this.g          = g;
     this.validation = parameters;
 }
Exemplo n.º 7
0
 public DsaParameters(BigInteger p, BigInteger q, BigInteger g, DsaValidationParameters parameters)
 {
     //IL_000e: Unknown result type (might be due to invalid IL or missing references)
     //IL_001c: Unknown result type (might be due to invalid IL or missing references)
     //IL_002a: Unknown result type (might be due to invalid IL or missing references)
     if (p == null)
     {
         throw new ArgumentNullException("p");
     }
     if (q == null)
     {
         throw new ArgumentNullException("q");
     }
     if (g == null)
     {
         throw new ArgumentNullException("g");
     }
     this.p     = p;
     this.q     = q;
     this.g     = g;
     validation = parameters;
 }
 protected bool Equals(
     DsaValidationParameters other)
 {
     return(counter == other.counter &&
            Arrays.AreEqual(seed, other.seed));
 }
		protected bool Equals(
			DsaValidationParameters other)
		{
			return counter == other.counter
				&& Arrays.AreEqual(seed, other.seed);
		}
Exemplo n.º 10
0
		public void TestDsa()
		{
			BigInteger a = BigInteger.ValueOf(1), b = BigInteger.ValueOf(2), c = BigInteger.ValueOf(3);

			DsaParameters dsaP1 = new DsaParameters(a, b, c);
			DsaParameters dsaP2 = new DsaParameters(a, b, c);
			DsaParameters dsaP3 = new DsaParameters(b, c, a);

			doTest(dsaP1, dsaP2, dsaP3);

			DsaValidationParameters vp1 = new DsaValidationParameters(new byte[20], 1024);
			DsaValidationParameters vp2 = new DsaValidationParameters(new byte[20], 1024);
			DsaValidationParameters vp3 = new DsaValidationParameters(new byte[24], 1024);

			doTest(vp1, vp1, vp3);
			doTest(vp1, vp2, vp3);

			byte[] bytes = new byte[20];
			bytes[0] = 1;

			vp3 = new DsaValidationParameters(bytes, 1024);

			doTest(vp1, vp2, vp3);

			vp3 = new DsaValidationParameters(new byte[20], 2048);

			doTest(vp1, vp2, vp3);
		}
 protected virtual bool Equals(DsaValidationParameters other) =>
 ((this.counter == other.counter) && Arrays.AreEqual(this.seed, other.seed));