mirror of
https://github.com/crskycode/GARbro.git
synced 2026-06-10 15:49:00 +08:00
Merge pull request #121 from killerswin2/master
Add support for xx na Kanojo no Tsukurikata 2
This commit is contained in:
@@ -1594,4 +1594,25 @@ namespace GameRes.Formats.KiriKiri
|
||||
}
|
||||
}
|
||||
}
|
||||
[Serializable]
|
||||
public class Kano2Crypt : ICrypt
|
||||
{
|
||||
public override void Decrypt(Xp3Entry entry, long offset, byte[] buffer, int pos, int count)
|
||||
{
|
||||
// only apply xor every 8 bytes
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
if ((i + pos) % 8 == 0)
|
||||
{
|
||||
buffer[i + pos] ^= (byte)entry.Hash;
|
||||
i += 7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Encrypt(Xp3Entry entry, long offset, byte[] buffer, int pos, int count)
|
||||
{
|
||||
Decrypt(entry, offset, buffer, pos, count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user