convertByteListToBigInt function

BigInt convertByteListToBigInt(
  1. List<int> bytes
)

Implementation

BigInt convertByteListToBigInt(List<int> 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;
}