From 486f1fe8988376c380fd3ef7b136814120b1759f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Sat, 14 Sep 2024 20:54:35 +0100 Subject: [PATCH] refactor: re-order decryption factory --- src/decrypt-worker/crypto/CryptoFactory.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/decrypt-worker/crypto/CryptoFactory.ts b/src/decrypt-worker/crypto/CryptoFactory.ts index 899e9f3..578f3be 100644 --- a/src/decrypt-worker/crypto/CryptoFactory.ts +++ b/src/decrypt-worker/crypto/CryptoFactory.ts @@ -12,12 +12,7 @@ import { TransparentCrypto } from './transparent/transparent'; import { QingTingFM$Device } from './qtfm/qtfm_device'; export const allCryptoFactories: CryptoFactory[] = [ - // Xiami (*.xm) - XiamiCrypto.make, - - // QMCv2 (*.mflac) - QMC2CryptoWithKey.make, - QMC2Crypto.make, + /// File with fixed headers goes first. // NCM (*.ncm) NCMCrypto.make, @@ -28,6 +23,17 @@ export const allCryptoFactories: CryptoFactory[] = [ // KWMv1 (*.kwm) KWMCrypto.make, + // Xiami (*.xm) + XiamiCrypto.make, + + /// File with a fixed footer goes second + + // QMCv2 (*.mflac) + QMC2CryptoWithKey.make, + QMC2Crypto.make, + + /// File without an obvious header or footer goes last. + // Migu3D/Keyless (*.wav; *.m4a) MiguCrypto.make,