Converts an int or BigInt to a Uint8List
Uint8List intToBuffer(i) { return Uint8List.fromList(i == null || i == 0 || i == BigInt.zero ? [] : dynamicToUint8List(padToEven(intToHex(i).substring(2)))); }