EDPoint.fromBytes constructor
Factory constructor to create an EDPoint from a byte representation.
This factory method constructs an Edwards curve point from its byte representation.
Parameters:
curve
: The Edwards curve associated with the point.data
: The byte array representing the point's coordinates.order
: The order of the point (optional).
Returns:
- An instance of EDPoint with the specified curve, coordinates, and optional order.
Implementation
factory EDPoint.fromBytes(
{required CurveED curve, required List<int> data, BigInt? order}) {
final coords = AbstractPoint.fromBytes(curve, data);
final x = coords.item1;
final y = coords.item2;
final t = x * y;
return EDPoint(
curve: curve,
x: x,
y: y,
z: BigInt.one,
t: t,
generator: false,
order: order);
}