From 22e5390958f49386755f1e3219a98b767a70e970 Mon Sep 17 00:00:00 2001 From: CBerJun Date: Mon, 13 Apr 2026 17:08:15 -0400 Subject: [PATCH] fix: Encrypting with RiddleCxCrypt --- ArcFormats/KiriKiri/KiriKiriCx.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ArcFormats/KiriKiri/KiriKiriCx.cs b/ArcFormats/KiriKiri/KiriKiriCx.cs index 7b0d9712..ac91ea4c 100644 --- a/ArcFormats/KiriKiri/KiriKiriCx.cs +++ b/ArcFormats/KiriKiri/KiriKiriCx.cs @@ -163,6 +163,11 @@ namespace GameRes.Formats.KiriKiri } 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 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) { - Decrypt (entry, offset, values, pos, count); + CxDecryptCore (entry, offset, values, pos, count); } protected Tuple ExecuteXCode (uint hash)