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); }
public override bool Equals(object obj) { Gost3410ValidationParameters gost3410ValidationParameters = obj as Gost3410ValidationParameters; if (gost3410ValidationParameters != null && gost3410ValidationParameters.c == c && gost3410ValidationParameters.x0 == x0 && gost3410ValidationParameters.cL == cL) { return(gost3410ValidationParameters.x0L == x0L); } return(false); }
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(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; }