G2AffinePoint.fromBytesUnchecked constructor

G2AffinePoint.fromBytesUnchecked(
  1. List<int> bytes
)

Creates a G2 affine point from bytes without checking curve or subgroup validity.

Implementation

factory G2AffinePoint.fromBytesUnchecked(List<int> bytes) {
  if (bytes.length == 48) {
    return G2AffinePoint._fromCompressedBytes(bytes);
  } else if (bytes.length == 96) {
    return G2AffinePoint._fromUncompressedBytes(bytes);
  }
  throw ArgumentException.invalidOperationArguments(
    "fromBytes",
    reason: "Invalid point bytes length.",
  );
}