public override bool Equals(
            object obj)
        {
            Gost3410ValidationParameters other = obj as Gost3410ValidationParameters;

            return(other != null &&
                   other.c == this.c &&
                   other.x0 == this.x0 &&
                   other.cL == this.cL &&
                   other.x0L == this.x0L);
        }
        public Gost3410Parameters(
            IBigInteger p,
            IBigInteger q,
            IBigInteger a,
			Gost3410ValidationParameters	validation)
        {
            if (p == null)
                throw new ArgumentNullException("p");
            if (q == null)
                throw new ArgumentNullException("q");
            if (a == null)
                throw new ArgumentNullException("a");

            this.p = p;
            this.q = q;
            this.a = a;
            this.validation = validation;
        }
示例#3
0
 public Gost3410Parameters(BigInteger p, BigInteger q, BigInteger a, Gost3410ValidationParameters validation)
 {
     if (p == null)
     {
         throw new ArgumentNullException("p");
     }
     if (q == null)
     {
         throw new ArgumentNullException("q");
     }
     if (a == null)
     {
         throw new ArgumentNullException("a");
     }
     this.p          = p;
     this.q          = q;
     this.a          = a;
     this.validation = validation;
 }
 public Gost3410Parameters(BigInteger p, BigInteger q, BigInteger a, Gost3410ValidationParameters validation)
 {
     //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 (a == null)
     {
         throw new ArgumentNullException("a");
     }
     this.p          = p;
     this.q          = q;
     this.a          = a;
     this.validation = validation;
 }
示例#5
0
        public override bool Equals(object obj)
        {
            Gost3410ValidationParameters gost3410ValidationParameters = obj as Gost3410ValidationParameters;

            return(gost3410ValidationParameters != null && gost3410ValidationParameters.c == this.c && gost3410ValidationParameters.x0 == this.x0 && gost3410ValidationParameters.cL == this.cL && gost3410ValidationParameters.x0L == this.x0L);
        }
示例#6
0
        public override bool Equals(object obj)
        {
            Gost3410ValidationParameters parameters = obj as Gost3410ValidationParameters;

            return((((parameters != null) && (parameters.c == this.c)) && ((parameters.x0 == this.x0) && (parameters.cL == this.cL))) && (parameters.x0L == this.x0L));
        }
示例#7
0
		public void TestGost3410()
		{
			BigInteger a = BigInteger.ValueOf(1), b = BigInteger.ValueOf(2), c = BigInteger.ValueOf(3);

			Gost3410Parameters g1 = new Gost3410Parameters(a, b, c);
			Gost3410Parameters g2 = new Gost3410Parameters(a, b, c);
			Gost3410Parameters g3 = new Gost3410Parameters(a, c, c);

			doTest(g1, g2, g3);

			Gost3410ValidationParameters v1 = new Gost3410ValidationParameters(100, 1);
			Gost3410ValidationParameters v2 = new Gost3410ValidationParameters(100, 1);
			Gost3410ValidationParameters v3 = new Gost3410ValidationParameters(101, 1);

			doTest(v1, v2, v3);

			v3 = new Gost3410ValidationParameters(100, 2);

			doTest(v1, v2, v3);

			v1 = new Gost3410ValidationParameters(100L, 1L);
			v2 = new Gost3410ValidationParameters(100L, 1L);
			v3 = new Gost3410ValidationParameters(101L, 1L);

			doTest(v1, v2, v3);

			v3 = new Gost3410ValidationParameters(100L, 2L);

			doTest(v1, v2, v3);
		}