Merge pull request #186 from CBerJun/rj-crypt-encrypt-fix

Fix XP3 creation with RiddleCxCrypt
This commit is contained in:
Crsky
2026-04-19 00:46:08 +08:00
committed by GitHub

View File

@@ -163,6 +163,11 @@ namespace GameRes.Formats.KiriKiri
} }
public override void Decrypt (Xp3Entry entry, long offset, byte[] buffer, int pos, int count) public override void Decrypt (Xp3Entry entry, long offset, byte[] buffer, int pos, int count)
{
CxDecryptCore (entry, offset, buffer, pos, count);
}
protected void CxDecryptCore (Xp3Entry entry, long offset, byte[] buffer, int pos, int count)
{ {
uint key = entry.Hash; uint key = entry.Hash;
uint base_offset = GetBaseOffset (key); uint base_offset = GetBaseOffset (key);
@@ -204,7 +209,7 @@ namespace GameRes.Formats.KiriKiri
public override void Encrypt (Xp3Entry entry, long offset, byte[] values, int pos, int count) public override void Encrypt (Xp3Entry entry, long offset, byte[] values, int pos, int count)
{ {
Decrypt (entry, offset, values, pos, count); CxDecryptCore (entry, offset, values, pos, count);
} }
protected Tuple<uint, uint> ExecuteXCode (uint hash) protected Tuple<uint, uint> ExecuteXCode (uint hash)