static Uint8List reverse(Uint8List bytes) { Uint8List reversed = Uint8List(bytes.length); for (int i = bytes.length; i > 0; i--) { reversed[bytes.length - i] = bytes[i - 1]; } return reversed; }