mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
(KiriKiri.ICrypt): override ToString method.
This commit is contained in:
@@ -53,6 +53,11 @@ namespace GameRes.Formats.KiriKiri
|
||||
/// </summary>
|
||||
public bool ObfuscatedIndex { get; set; }
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return this.GetType().Name;
|
||||
}
|
||||
|
||||
public virtual byte Decrypt (Xp3Entry entry, long offset, byte value)
|
||||
{
|
||||
byte[] buffer = new byte[1] { value };
|
||||
@@ -308,6 +313,11 @@ namespace GameRes.Formats.KiriKiri
|
||||
m_key = (byte)key;
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return string.Format ("{0}(0x{1:X02})", base.ToString(), m_key);
|
||||
}
|
||||
|
||||
public override byte Decrypt (Xp3Entry entry, long offset, byte value)
|
||||
{
|
||||
return (byte)(value ^ m_key);
|
||||
@@ -814,6 +824,11 @@ namespace GameRes.Formats.KiriKiri
|
||||
m_seed = seed;
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return string.Format ("{0}(0x{1:X08})", base.ToString(), m_seed);
|
||||
}
|
||||
|
||||
public override byte Decrypt (Xp3Entry entry, long offset, byte value)
|
||||
{
|
||||
int key_pos = (int)offset & 0x1F;
|
||||
@@ -881,6 +896,11 @@ namespace GameRes.Formats.KiriKiri
|
||||
m_key = key;
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return string.Format ("{0}(0x{1:X02})", base.ToString(), m_key);
|
||||
}
|
||||
|
||||
public override byte Decrypt (Xp3Entry entry, long offset, byte value)
|
||||
{
|
||||
return (byte)((value ^ m_key) + 1);
|
||||
|
||||
Reference in New Issue
Block a user