JubJubNativeFq.fromBytes constructor
Implementation
factory JubJubNativeFq.fromBytes(List<int> bytes) {
final toBig = BigintUtils.fromBytes(
bytes.exc(length: 32, operation: "Invalid field bytes encoding length"),
byteOrder: Endian.little,
);
if (toBig >= JubJubNativeConst.qJ) {
throw ArgumentException.invalidOperationArguments(
"fromBytes64",
reason: "Invalid field bytes encoding.",
);
}
return JubJubNativeFq.nP(toBig);
}