public virtual ECPoint ImportPoint(ECPoint p) { if(this == p.Curve) { return p; } if(p.IsInfinity) { return Infinity; } // TODO Default behaviour could be improved if the two curves have the same coordinate system by copying any Z coordinates. p = p.Normalize(); return ValidatePoint(p.XCoord.ToBigInteger(), p.YCoord.ToBigInteger(), p.IsCompressed); }
public static ECPoint ImportPoint(ECCurve c, ECPoint p) { ECCurve cp = p.Curve; if (!c.Equals(cp)) { throw new ArgumentException("Point must be on the same curve"); } return(c.ImportPoint(p)); }