public static byte[] pointEncode(CurveType curveType, PointFormatType format, ECPoint point)
      throws GeneralSecurityException {
    return pointEncode(getCurveSpec(curveType).getCurve(), format, point);
  }
Encodes a point on an elliptic curve.

@param curve the elliptic curve
@param format the format for the encoding
@param point the point to encode
@return the encoded key exchange
@throws GeneralSecurityException if the point is not on the curve or if the format is not
    supported.
@since 1.1.0
java_src/src/main/java/com/google/crypto/tink/subtle/EllipticCurves.java