Compare commits
No commits in common. "47b7273dbc6c7511d8957a2047eb3ebde5179522" and "fe3bad587512c8f60f28e50c358be79e1a917fde" have entirely different histories.
47b7273dbc
...
fe3bad5875
@ -13,18 +13,14 @@ import { DecryptResult } from '@/decrypt/entity';
|
|||||||
|
|
||||||
//prettier-ignore
|
//prettier-ignore
|
||||||
const MagicHeader = [
|
const MagicHeader = [
|
||||||
0x79, 0x65, 0x65, 0x6C, 0x69, 0x6F, 0x6E, 0x2D,
|
0x79, 0x65, 0x65, 0x6C, 0x69, 0x6F, 0x6E, 0x2D,
|
||||||
0x6B, 0x75, 0x77, 0x6F, 0x2D, 0x74, 0x6D, 0x65,
|
0x6B, 0x75, 0x77, 0x6F, 0x2D, 0x74, 0x6D, 0x65,
|
||||||
];
|
]
|
||||||
const MagicHeader2 = [
|
|
||||||
0x79, 0x65, 0x65, 0x6C, 0x69, 0x6F, 0x6E, 0x2D,
|
|
||||||
0x6B, 0x75, 0x77, 0x6F, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
];
|
|
||||||
const PreDefinedKey = 'MoOtOiTvINGwd2E6n0E1i7L5t2IoOoNk';
|
const PreDefinedKey = 'MoOtOiTvINGwd2E6n0E1i7L5t2IoOoNk';
|
||||||
|
|
||||||
export async function Decrypt(file: File, raw_filename: string, _: string): Promise<DecryptResult> {
|
export async function Decrypt(file: File, raw_filename: string, _: string): Promise<DecryptResult> {
|
||||||
const oriData = new Uint8Array(await GetArrayBuffer(file));
|
const oriData = new Uint8Array(await GetArrayBuffer(file));
|
||||||
if (!BytesHasPrefix(oriData, MagicHeader) && !BytesHasPrefix(oriData, MagicHeader2)) {
|
if (!BytesHasPrefix(oriData, MagicHeader)) {
|
||||||
if (SniffAudioExt(oriData) === 'aac') {
|
if (SniffAudioExt(oriData) === 'aac') {
|
||||||
return await RawDecrypt(file, raw_filename, 'aac', false);
|
return await RawDecrypt(file, raw_filename, 'aac', false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user