mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 20:04:13 +08:00
(EncryptionV3): in case of empty key use v2 decryption.
This commit is contained in:
parent
1ffca62364
commit
260cf8c6d9
@ -179,7 +179,9 @@ namespace GameRes.Formats.Qlie
|
|||||||
/// Internal game data used to decrypt encrypted entries.
|
/// Internal game data used to decrypt encrypted entries.
|
||||||
/// null if not used.
|
/// null if not used.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public byte[] GameKeyData;
|
internal byte[] GameKeyData;
|
||||||
|
|
||||||
|
internal bool GameKeyIsEmpty { get { return GameKeyData != null && GameKeyData.Length == 0; } }
|
||||||
|
|
||||||
public EncryptionV3 (ArcView file, byte[] game_key)
|
public EncryptionV3 (ArcView file, byte[] game_key)
|
||||||
{
|
{
|
||||||
@ -213,7 +215,7 @@ namespace GameRes.Formats.Qlie
|
|||||||
public override void DecryptEntry (byte[] data, int offset, int length, QlieEntry entry)
|
public override void DecryptEntry (byte[] data, int offset, int length, QlieEntry entry)
|
||||||
{
|
{
|
||||||
var key_file = entry.KeyFile;
|
var key_file = entry.KeyFile;
|
||||||
if (null == key_file)
|
if (null == key_file || GameKeyIsEmpty)
|
||||||
{
|
{
|
||||||
base.DecryptEntry (data, offset, length, entry);
|
base.DecryptEntry (data, offset, length, entry);
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user