mirror of
https://git.um-react.app/um/um-react.git
synced 2026-11-27 23:56:59 +00:00
refactor: major package updates
This commit is contained in:
1 parent
2e52c67533
commit
a11caaae92
34 files changed
+373
-240
No files matched your search
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user