bugfix for #36 #50 #59

Merged
jixunmoe merged 1 commits from nullptr-0/web:pr into master 2023-08-28 17:10:06 +00:00
Contributor

bugfix for issues like #36 and #50

bugfix for issues like [#36] and [#50] [#36]: https://git.unlock-music.dev/um/web/issues/36 [#50]: https://git.unlock-music.dev/um/web/issues/50
nullptr-0 added 1 commit 2023-08-28 15:46:36 +00:00
jixunmoe requested changes 2023-08-28 15:58:18 +00:00
@ -35,2 +32,4 @@
}
// 每次处理 2M 的数据
const DECRYPTION_BUF_SIZE = Math.min(2 *1024 * 1024, kgmBlob.byteLength);
Owner

DECRYPTION_BUF_SIZE 名称是常量。更改部分不应影响解密过程。

建议更改:

  const initBufSize = Math.min(2 *1024 * 1024, kgmBlob.byteLength); // 初始化缓冲区大小
  const pQmcBuf = KgmCryptoObj._malloc(initBufSize);
  KgmCryptoObj.writeArrayToMemory(kgmBuf.slice(0, initBufSize), pQmcBuf);

另外 pQmcBuf 可以顺便改成 pInitBuf 或其他不含 qmc 字样的变量名。

`DECRYPTION_BUF_SIZE` 名称是常量。更改部分不应影响解密过程。 建议更改: ```js const initBufSize = Math.min(2 *1024 * 1024, kgmBlob.byteLength); // 初始化缓冲区大小 const pQmcBuf = KgmCryptoObj._malloc(initBufSize); KgmCryptoObj.writeArrayToMemory(kgmBuf.slice(0, initBufSize), pQmcBuf); ``` 另外 `pQmcBuf` 可以顺便改成 `pInitBuf` 或其他不含 `qmc` 字样的变量名。
nullptr-0 marked this conversation as resolved
@ -36,2 +33,4 @@
}
// 每次处理 2M 的数据
const DECRYPTION_BUF_SIZE = Math.min(2 *1024 * 1024, qmcBlob.byteLength);
Owner

参见 KGM 部分的修改建议。

参见 KGM 部分的修改建议。
nullptr-0 marked this conversation as resolved
nullptr-0 force-pushed pr from e3188ef8eb to 7ade485d2e 2023-08-28 16:30:08 +00:00 Compare
jixunmoe requested review from jixunmoe 2023-08-28 17:09:00 +00:00
jixunmoe approved these changes 2023-08-28 17:09:23 +00:00
jixunmoe merged commit 6603210ad9 into master 2023-08-28 17:10:06 +00:00
nullptr-0 deleted branch pr 2023-08-28 17:14:48 +00:00
Sign in to join this conversation.
No description provided.