Inheritance: Asn1Encodable
Exemplo n.º 1
0
        private DHDomainParameters(Asn1Sequence seq)
        {
            if (seq.Count < 3 || seq.Count > 5)
            {
                throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");
            }

            IEnumerator e = seq.GetEnumerator();

            this.p = DerInteger.GetInstance(GetNext(e));
            this.g = DerInteger.GetInstance(GetNext(e));
            this.q = DerInteger.GetInstance(GetNext(e));

            Asn1Encodable next = GetNext(e);

            if (next != null && next is DerInteger)
            {
                this.j = DerInteger.GetInstance(next);
                next   = GetNext(e);
            }

            if (next != null)
            {
                this.validationParms = DHValidationParms.GetInstance(next.ToAsn1Object());
            }
        }
		public DHDomainParameters(DerInteger p, DerInteger g, DerInteger q, DerInteger j,
			DHValidationParms validationParms)
		{
			if (p == null)
				throw new ArgumentNullException("p");
			if (g == null)
				throw new ArgumentNullException("g");
			if (q == null)
				throw new ArgumentNullException("q");

			this.p = p;
			this.g = g;
			this.q = q;
			this.j = j;
			this.validationParms = validationParms;
		}
Exemplo n.º 3
0
 public DHDomainParameters(DerInteger p, DerInteger g, DerInteger q, DerInteger j, DHValidationParms validationParms)
 {
     if (p == null)
     {
         throw new ArgumentNullException("p");
     }
     if (g == null)
     {
         throw new ArgumentNullException("g");
     }
     if (q == null)
     {
         throw new ArgumentNullException("q");
     }
     this.p = p;
     this.g = g;
     this.q = q;
     this.j = j;
     this.validationParms = validationParms;
 }
		private DHDomainParameters(Asn1Sequence seq)
		{
			if (seq.Count < 3 || seq.Count > 5)
				throw new ArgumentException("Bad sequence size: " + seq.Count, "seq");

			IEnumerator e = seq.GetEnumerator();
			this.p = DerInteger.GetInstance(GetNext(e));
			this.g = DerInteger.GetInstance(GetNext(e));
			this.q = DerInteger.GetInstance(GetNext(e));

			Asn1Encodable next = GetNext(e);

			if (next != null && next is DerInteger)
			{
				this.j = DerInteger.GetInstance(next);
				next = GetNext(e);
			}

			if (next != null)
			{
				this.validationParms = DHValidationParms.GetInstance(next.ToAsn1Object());
			}
		}
Exemplo n.º 5
0
        private DHDomainParameters(Asn1Sequence seq)
        {
            //IL_0032: Unknown result type (might be due to invalid IL or missing references)
            if (seq.Count < 3 || seq.Count > 5)
            {
                throw new ArgumentException(string.Concat((object)"Bad sequence size: ", (object)seq.Count), "seq");
            }
            global::System.Collections.IEnumerator enumerator = seq.GetEnumerator();
            p = DerInteger.GetInstance(GetNext(enumerator));
            g = DerInteger.GetInstance(GetNext(enumerator));
            q = DerInteger.GetInstance(GetNext(enumerator));
            Asn1Encodable next = GetNext(enumerator);

            if (next != null && next is DerInteger)
            {
                j    = DerInteger.GetInstance(next);
                next = GetNext(enumerator);
            }
            if (next != null)
            {
                validationParms = DHValidationParms.GetInstance(next.ToAsn1Object());
            }
        }
Exemplo n.º 6
0
 public DHDomainParameters(DerInteger p, DerInteger g, DerInteger q, DerInteger j, DHValidationParms validationParms)
 {
     //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 (g == null)
     {
         throw new ArgumentNullException("g");
     }
     if (q == null)
     {
         throw new ArgumentNullException("q");
     }
     this.p = p;
     this.g = g;
     this.q = q;
     this.j = j;
     this.validationParms = validationParms;
 }
Exemplo n.º 7
0
 public static DHValidationParms GetInstance(Asn1TaggedObject obj, bool isExplicit)
 {
     return(DHValidationParms.GetInstance(Asn1Sequence.GetInstance(obj, isExplicit)));
 }
Exemplo n.º 8
0
 public DHDomainParameters(BigInteger p, BigInteger g, BigInteger q, BigInteger j,
                           DHValidationParms validationParms) : this(new DerInteger(p), new DerInteger(g), new DerInteger(q), (j != null ? new DerInteger(j) : null), validationParms)
 {
 }