MengYX
4 years ago
No known key found for this signature in database
GPG Key ID: E63F9C7303E8F604
1 changed files with
7 additions and
4 deletions
-
src/decrypt/kgm.js
|
@ -12,12 +12,15 @@ const VprMaskDiff = [0x25, 0xDF, 0xE8, 0xA6, 0x75, 0x1E, 0x75, 0x0E, |
|
|
0x00] |
|
|
0x00] |
|
|
|
|
|
|
|
|
export async function Decrypt(file, raw_filename, raw_ext) { |
|
|
export async function Decrypt(file, raw_filename, raw_ext) { |
|
|
|
|
|
try { |
|
|
if (window.location.protocol === "file:") { |
|
|
if (window.location.protocol === "file:") { |
|
|
return { |
|
|
return { |
|
|
status: false, |
|
|
status: false, |
|
|
message: "请使用<a target='_blank' href='https://github.com/ix64/unlock-music/wiki/其他音乐格式工具'>CLI版本</a>进行解锁" |
|
|
message: "请使用<a target='_blank' href='https://github.com/ix64/unlock-music/wiki/其他音乐格式工具'>CLI版本</a>进行解锁" |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} catch { |
|
|
|
|
|
} |
|
|
const oriData = new Uint8Array(await GetArrayBuffer(file)); |
|
|
const oriData = new Uint8Array(await GetArrayBuffer(file)); |
|
|
if (raw_ext === "vpr") { |
|
|
if (raw_ext === "vpr") { |
|
|
if (!IsBytesEqual(VprHeader, oriData.slice(0, 0x10))) |
|
|
if (!IsBytesEqual(VprHeader, oriData.slice(0, 0x10))) |
|
|