Example #1
0
 /// <summary>
 /// Returns the affine coordinates of the curve point.
 /// </summary>
 /// <returns>Tuple containing x- and y-coordinate.</returns>
 public (BigNumber, BigNumber) GetCoordinates()
 {
     if (IsAtInfinity)
     {
         throw new InvalidOperationException("Cannot get coordinates from point at infinity!");
     }
     using (var ctx = BigNumberContextHandle.Create())
     {
         var x = new BigNumber();
         var y = new BigNumber();
         ECPointHandle.GetAffineCoordinates(_ecGroup, Handle, x.Handle, y.Handle, ctx);
         return(x, y);
     }
 }