Upgrade to use @unlock-music/crypto #78

Merged
lsr merged 18 commits from upgrade/um-crypto-part1 into main 2024-09-24 22:19:32 +00:00
Showing only changes of commit 1cdd68e448 - Show all commits

View File

@ -52,6 +52,7 @@ export class XimalayaPCDecipher implements DecipherInstance {
const encryptedAudioPart = buffer.slice(encryptedHeaderOffset, plainAudioDataOffset); const encryptedAudioPart = buffer.slice(encryptedHeaderOffset, plainAudioDataOffset);
const encryptedAudioPartLen = xm.decrypt(encryptedAudioPart); const encryptedAudioPartLen = xm.decrypt(encryptedAudioPart);
const audioSize = audioHeader.byteLength + encryptedAudioPartLen + plainAudioDataLength; const audioSize = audioHeader.byteLength + encryptedAudioPartLen + plainAudioDataLength;
xm.free();
const result = new Uint8Array(audioSize); const result = new Uint8Array(audioSize);
result.set(audioHeader); result.set(audioHeader);