Skip to content

Instantly share code, notes, and snippets.

@the-byte-bender
the-byte-bender / script.dart
Created December 2, 2023 13:22
Script to encrypt/decrypt sounds for mist world
import 'dart:io';
import 'dart:convert';
List<int> applyXOR(List<int> data, int soundId) {
List<int> XOR_KEY = [8, 5, 13, 5, 97, 4, 63, 27];
XOR_KEY[0] ^= (soundId & 0xFF);
XOR_KEY[6] ^= ((soundId >> 8) & 0xFF);
for (int i = 0; i < data.length; i += 32) {