public X9ECParameters( Asn1Sequence seq) { if (!(seq[0] is DerInteger) || !((DerInteger)seq[0]).Value.Equals(BigInteger.One)) { throw new ArgumentException("bad version in X9ECParameters"); } X9Curve x9c = new X9Curve( X9FieldID.GetInstance(seq[1]), Asn1Sequence.GetInstance(seq[2])); this.curve = x9c.Curve; object p = seq[3]; if (p is X9ECPoint) { this.g = ((X9ECPoint)p); } else { this.g = new X9ECPoint(curve, (Asn1OctetString)p); } this.n = ((DerInteger)seq[4]).Value; this.seed = x9c.GetSeed(); if (seq.Count == 6) { this.h = ((DerInteger)seq[5]).Value; } }
public X9ECParameters(Asn1Sequence seq) { if (!(seq[0] is DerInteger) || !((DerInteger)seq[0]).Value.Equals(BigInteger.One)) { throw new ArgumentException("bad version in X9ECParameters"); } X9Curve x9Curve = null; x9Curve = ((!(seq[2] is X9Curve)) ? new X9Curve(new X9FieldID((Asn1Sequence)seq[1]), (Asn1Sequence)seq[2]) : ((X9Curve)seq[2])); curve = x9Curve.Curve; if (seq[3] is X9ECPoint) { g = ((X9ECPoint)seq[3]).Point; } else { g = new X9ECPoint(curve, (Asn1OctetString)seq[3]).Point; } n = ((DerInteger)seq[4]).Value; seed = x9Curve.GetSeed(); if (seq.Count == 6) { h = ((DerInteger)seq[5]).Value; } }
public X9ECParameters(Asn1Sequence seq) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) if (!(seq[0] is DerInteger) || !((DerInteger)seq[0]).Value.Equals(BigInteger.One)) { throw new ArgumentException("bad version in X9ECParameters"); } X9Curve x9Curve = new X9Curve(X9FieldID.GetInstance(seq[1]), Asn1Sequence.GetInstance(seq[2])); curve = x9Curve.Curve; object obj = seq[3]; if (obj is X9ECPoint) { g = (X9ECPoint)obj; } else { g = new X9ECPoint(curve, (Asn1OctetString)obj); } n = ((DerInteger)seq[4]).Value; seed = x9Curve.GetSeed(); if (seq.Count == 6) { h = ((DerInteger)seq[5]).Value; } }
public X9ECParameters( Asn1Sequence seq) { if (!(seq[0] is DerInteger) || !((DerInteger) seq[0]).Value.Equals(BigInteger.One)) { throw new ArgumentException("bad version in X9ECParameters"); } X9Curve x9c = new X9Curve( X9FieldID.GetInstance(seq[1]), Asn1Sequence.GetInstance(seq[2])); this.curve = x9c.Curve; object p = seq[3]; if (p is X9ECPoint) { this.g = ((X9ECPoint)p); } else { this.g = new X9ECPoint(curve, (Asn1OctetString)p); } this.n = ((DerInteger)seq[4]).Value; this.seed = x9c.GetSeed(); if (seq.Count == 6) { this.h = ((DerInteger)seq[5]).Value; } }