mirror of
https://git.um-react.app/um/um-react.git
synced 2025-11-28 03:23:02 +00:00
refactor: improve flow of decryption (#2)
This commit is contained in:
@@ -3,11 +3,14 @@ import type { CryptoBase } from '../CryptoBase';
|
||||
import key from './qmc_v1.key.ts';
|
||||
|
||||
export class QMC1Crypto implements CryptoBase {
|
||||
cryptoName = 'QMCv1';
|
||||
cryptoName = 'QMC/v1';
|
||||
checkByDecryptHeader = true;
|
||||
decryptTargetAudio = true;
|
||||
|
||||
async decrypt(_buffer: ArrayBuffer, blob: Blob): Promise<Blob> {
|
||||
return transformBlob(blob, (p) => p.make.QMCv1(key));
|
||||
async decrypt(buffer: ArrayBuffer): Promise<Blob> {
|
||||
return transformBlob(buffer, (p) => p.make.QMCv1(key));
|
||||
}
|
||||
|
||||
public static make() {
|
||||
return new QMC1Crypto();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user