(KiriKiri): another encryption scheme.

This commit is contained in:
morkt 2016-09-10 15:10:32 +04:00
parent d05bcef548
commit 9fe37e18ca
2 changed files with 37 additions and 0 deletions

View File

@ -765,4 +765,38 @@ namespace GameRes.Formats.KiriKiri
Decrypt (entry, offset, values, pos, count);
}
}
[Serializable]
public class StripeCrypt : ICrypt
{
readonly byte m_key;
public StripeCrypt (byte key)
{
m_key = key;
}
public override byte Decrypt (Xp3Entry entry, long offset, byte value)
{
return (byte)((value ^ m_key) + 1);
}
public override void Decrypt (Xp3Entry entry, long offset, byte[] values, int pos, int count)
{
for (int i = 0; i < count; ++i)
{
values[pos+i] ^= m_key;
values[pos+i] ++;
}
}
public override void Encrypt (Xp3Entry entry, long offset, byte[] values, int pos, int count)
{
for (int i = 0; i < count; ++i)
{
values[pos+i] --;
values[pos+i] ^= m_key;
}
}
}
}

View File

@ -234,6 +234,7 @@ Altered Pink ~Tokumu Sentai Duel Ranger~<br/>
Aozora Gakko no Sensei-kun<br/>
Cafe Sourire<br/>
Coμ<br/>
Corona Blossom vol.1<br/>
Crime Rhyme series<br/>
Damegane<br/>
Distance<br/>
@ -272,6 +273,7 @@ Se-kirara<br/>
Sharin no Kuni, Himawari no Shoujo<br/>
Shokusai no Miyako<br/>
Smile Cubic!<br/>
Specialite!<br/>
Suiheisen made Nan Mile?<br/>
Swan Song<br/>
Teakamamire no Tenshi<br/>
@ -402,6 +404,7 @@ Najimi no Oba-chan <span class="footnote">ShiinaRio v2.47</span><br/>
Niizuma to Yuukaihan <span class="footnote">ShiinaRio v2.45</span><br/>
Otome Chibaku Yuugi <span class="footnote">ShiinaRio v2.40</span><br/>
Otome Juurin Yuugi <span class="footnote">ShiinaRio v2.37</span><br/>
Pure Love! <span class="footnote">ShiinaRio v2.47</span><br/>
Ran→Sem <span class="footnote">ShiinaRio v2.47</span><br/>
Rin×Sen <span class="footnote">ShiinaRio v2.47</span><br/>
Sabae no Ou <span class="footnote">ShiinaRio v2.36</span><br/>