decodeBigInt function
Decode a BigInt from bytes in big-endian encoding. @param {Uint8List} Uint8List to decode
Implementation
BigInt decodeBigInt(Uint8List bytes) {
BigInt result = BigInt.from(0);
//
for (int i = 0; i < bytes.length; i++) {
result += BigInt.from(bytes[bytes.length - i - 1]) << (8 * i);
}
return result;
}