refactor: major package updates

This commit is contained in:
鲁树人 committed 2025-10-16 01:00:38 +09:00
1 parent 2e52c67533
commit a11caaae92
34 files changed
+373 -240

No files matched your search

+10 -7
View File
@@ -6,22 +6,25 @@ export class Migu3DKeylessDecipher implements DecipherInstance {
cipherName = 'Migu3D (Keyless)';
async decrypt(buffer: Uint8Array): Promise<DecipherResult | DecipherOK> {
const mg3d = Migu3D.fromHeader(buffer.subarray(0, 0x100));
const audioBuffer = new Uint8Array(buffer);
const mg3d = Migu3D.fromHeader(buffer.subarray(0, 0x100));
for (const [block, i] of chunkBuffer(audioBuffer)) {
mg3d.decrypt(block, i);
try {
for (const [block, i] of chunkBuffer(audioBuffer)) {
mg3d.decrypt(block, i);
}
} finally {
mg3d.free();
}
mg3d.free();
return {
return Promise.resolve({
cipherName: this.cipherName,
status: Status.OK,
data: audioBuffer,
};
});
}
public static make() {
public static make(this: void) {
return new Migu3DKeylessDecipher();
}
}