Merge pull request #121 from killerswin2/master

Add support for xx na Kanojo no Tsukurikata 2
This commit is contained in:
Crsky
2025-08-02 20:25:36 +08:00
committed by GitHub
2 changed files with 21 additions and 0 deletions

View File

@@ -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);
}
}
}

View File

Binary file not shown.