ProjectiveECCPoint.fromBytes constructor

ProjectiveECCPoint.fromBytes({
  1. required CurveFp curve,
  2. required List<int> data,
  3. BigInt? order,
})

Constructs a ProjectiveECCPoint from a byte representation. The curve parameter specifies the elliptic curve, and data is the byte data. order is the order of the point.

Implementation

factory ProjectiveECCPoint.fromBytes(
    {required CurveFp curve, required List<int> data, BigInt? order}) {
  final coords = AbstractPoint.fromBytes(curve, data);
  final x = coords.item1;
  final y = coords.item2;
  return ProjectiveECCPoint(
      curve: curve,
      x: x,
      y: y,
      z: BigInt.one,
      generator: false,
      order: order);
}