mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 21:55:34 +08:00
(ICrypt.ObfuscatedIndex): new virtual property.
This commit is contained in:
parent
bec2977429
commit
853ed0eaa8
@ -198,7 +198,7 @@ namespace GameRes.Formats.KiriKiri
|
|||||||
entry.IsEncrypted = entry.Cipher != NoCryptAlgorithm;
|
entry.IsEncrypted = entry.Cipher != NoCryptAlgorithm;
|
||||||
|
|
||||||
var name = new string (header.ReadChars (name_size));
|
var name = new string (header.ReadChars (name_size));
|
||||||
if (entry.Cipher is ZecchouCrypt && ObfuscatedPathRe.IsMatch (name))
|
if (entry.Cipher.ObfuscatedIndex && ObfuscatedPathRe.IsMatch (name))
|
||||||
{
|
{
|
||||||
goto NextEntry;
|
goto NextEntry;
|
||||||
}
|
}
|
||||||
@ -245,7 +245,7 @@ namespace GameRes.Formats.KiriKiri
|
|||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty (entry.Name) && entry.Segments.Any())
|
if (!string.IsNullOrEmpty (entry.Name) && entry.Segments.Any())
|
||||||
{
|
{
|
||||||
if (entry.Cipher is ZecchouCrypt)
|
if (entry.Cipher.ObfuscatedIndex)
|
||||||
{
|
{
|
||||||
DeobfuscateEntry (entry);
|
DeobfuscateEntry (entry);
|
||||||
}
|
}
|
||||||
@ -764,6 +764,13 @@ NextEntry:
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual bool HashAfterCrypt { get { return false; } }
|
public virtual bool HashAfterCrypt { get { return false; } }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// whether XP3 index is obfuscated:
|
||||||
|
/// - duplicate entries
|
||||||
|
/// - entries have additional dummy segments
|
||||||
|
/// </summary>
|
||||||
|
public virtual bool ObfuscatedIndex { get { return false; } }
|
||||||
|
|
||||||
public virtual byte Decrypt (Xp3Entry entry, long offset, byte value)
|
public virtual byte Decrypt (Xp3Entry entry, long offset, byte value)
|
||||||
{
|
{
|
||||||
byte[] buffer = new byte[1] { value };
|
byte[] buffer = new byte[1] { value };
|
||||||
|
@ -520,6 +520,8 @@ namespace GameRes.Formats.KiriKiri
|
|||||||
public ZecchouCrypt (CxScheme scheme) : base (scheme)
|
public ZecchouCrypt (CxScheme scheme) : base (scheme)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool ObfuscatedIndex { get { return true; } }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* CxEncryption base branch order
|
/* CxEncryption base branch order
|
||||||
|
Loading…
Reference in New Issue
Block a user