refactor: improve flow of decryption (#2)

This commit is contained in:
鲁树人
2023-05-21 23:38:32 +01:00
parent bc1c836d57
commit f7353ef4cb
7 changed files with 43 additions and 21 deletions

View File

@@ -6,14 +6,14 @@ import { XiamiCrypto } from './xiami/xiami';
export const allCryptoFactories: CryptoFactory[] = [
// Xiami (*.xm)
() => new XiamiCrypto(),
XiamiCrypto.make,
// QMCv2 (*.mflac)
() => new QMC2Crypto(),
QMC2Crypto.make,
// Crypto that does not implement "checkBySignature" or need to decrypt the entire file and then check audio type,
// should be moved to the bottom of the list for performance reasons.
// QMCv1 (*.qmcflac)
() => new QMC1Crypto(),
QMC1Crypto.make,
];