Converts an int to a Uint8List
Uint8List intToBuffer(int i) { ArgumentError.checkNotNull(i); return Uint8List.fromList(hex.decode(padToEven(intToHex(i).substring(2)))); }