mirror of
https://github.com/crskycode/GARbro.git
synced 2024-10-22 23:28:16 +08:00
Ensure that DXA is not "decrypted" when not needed.
This commit is contained in:
parent
2e8057aa54
commit
b3f5195a9a
@ -90,15 +90,19 @@ namespace GameRes.Formats.DxLib
|
|||||||
//TODO: Ask for key here.
|
//TODO: Ask for key here.
|
||||||
|
|
||||||
var key = DefaultKey;
|
var key = DefaultKey;
|
||||||
|
if ((dx.Flags & DXA8Flags.DXA_FLAG_NO_KEY) == 0)
|
||||||
|
{
|
||||||
if ((dx.Flags & DXA8Flags.DXA_FLAG_NO_HEAD_PRESS) != 0)
|
if ((dx.Flags & DXA8Flags.DXA_FLAG_NO_HEAD_PRESS) != 0)
|
||||||
{
|
{
|
||||||
var index = file.View.ReadBytes(dx.IndexOffset, dx.IndexSize);
|
var index = file.View.ReadBytes(dx.IndexOffset, dx.IndexSize);
|
||||||
Decrypt(index, 0, index.Length, 0, key);
|
Decrypt(index, 0, index.Length, 0, key);
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
//input is compressed. First by huffman then by LZ. if it's also encrypted then we're stuck.
|
//input is compressed. First by huffman then by LZ. if it's also encrypted then we're stuck.
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// decrypt-2
|
// decrypt-2
|
||||||
// decompress
|
// decompress
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user