Browse Source

Add GitHub Actions for wasm & chores

20230320
xhacker-zzz 2 years ago
parent
commit
63dc5c125c
  1. 4
      .github/workflows/build.yml
  2. 4
      .github/workflows/release-build.yml
  3. 2
      src/decrypt/qmc.ts
  4. 2
      src/decrypt/qmc_key.ts

4
.github/workflows/build.yml

@ -63,6 +63,10 @@ jobs:
- name: Install Dependencies - name: Install Dependencies
run: npm ci run: npm ci
- name: Build Wasm
run: bash ./src/QmcWasm/build-wasm
bash ./src/KgmWasm/build-wasm
- name: Build - name: Build
run: npm run build ${{ matrix.BUILD_ARGS }} run: npm run build ${{ matrix.BUILD_ARGS }}

4
.github/workflows/release-build.yml

@ -19,6 +19,10 @@ jobs:
- name: Install Dependencies - name: Install Dependencies
run: npm ci run: npm ci
- name: Build Wasm
run: bash ./src/QmcWasm/build-wasm
bash ./src/KgmWasm/build-wasm
- name: Build Legacy - name: Build Legacy
env: env:
GZIP: "--best" GZIP: "--best"

2
src/decrypt/qmc.ts

@ -56,7 +56,7 @@ export async function Decrypt(file: Blob, raw_filename: string, raw_ext: string)
musicID = v2Decrypted.songId; musicID = v2Decrypted.songId;
console.log('qmc wasm decoder suceeded'); console.log('qmc wasm decoder suceeded');
} else { } else {
console.warn('QmcWasm failed with error %s', v2Decrypted.error || '(no error)'); console.warn('QmcWasm failed with error %s', v2Decrypted.error || '(unknown error)');
} }
} }

2
src/decrypt/qmc_key.ts

@ -37,8 +37,6 @@ export function simpleMakeKey(salt: number, length: number): number[] {
const mixKey1: Uint8Array = new Uint8Array([ 0x33, 0x38, 0x36, 0x5A, 0x4A, 0x59, 0x21, 0x40, 0x23, 0x2A, 0x24, 0x25, 0x5E, 0x26, 0x29, 0x28 ]) const mixKey1: Uint8Array = new Uint8Array([ 0x33, 0x38, 0x36, 0x5A, 0x4A, 0x59, 0x21, 0x40, 0x23, 0x2A, 0x24, 0x25, 0x5E, 0x26, 0x29, 0x28 ])
const mixKey2: Uint8Array = new Uint8Array([ 0x2A, 0x2A, 0x23, 0x21, 0x28, 0x23, 0x24, 0x25, 0x26, 0x5E, 0x61, 0x31, 0x63, 0x5A, 0x2C, 0x54 ]) const mixKey2: Uint8Array = new Uint8Array([ 0x2A, 0x2A, 0x23, 0x21, 0x28, 0x23, 0x24, 0x25, 0x26, 0x5E, 0x61, 0x31, 0x63, 0x5A, 0x2C, 0x54 ])
const v2KeyPrefix: Uint8Array = new Uint8Array([ 0x51, 0x51, 0x4D, 0x75, 0x73, 0x69, 0x63, 0x20, 0x45, 0x6E, 0x63, 0x56, 0x32, 0x2C, 0x4B, 0x65, 0x79, 0x3A ])
function decryptV2Key(key: Buffer): Buffer function decryptV2Key(key: Buffer): Buffer
{ {
const textEnc = new TextDecoder(); const textEnc = new TextDecoder();

Loading…
Cancel
Save