readBytes static method
internal method to convert Unit8List to BigInt
Implementation
static BigInt readBytes(Uint8List bytes) {
BigInt result = BigInt.zero;
for (final byte in bytes) {
// reading in big-endian, so we essentially concat the new byte to the end
result = (result << 8) | BigInt.from(byte & 0xff);
}
return result;
}