1
0
forked from um/web

Add GitHub Actions for wasm & chores

This commit is contained in:
xhacker-zzz 2022-11-21 01:48:24 +08:00
parent f6af50077a
commit 81136dd4f8
4 changed files with 9 additions and 3 deletions

View File

@ -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 }}

View File

@ -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"

View File

@ -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)');
} }
} }

View File

@ -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();