From f765698a581d8748c4f8dfa679593ed1137e4108 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 17:14:52 +0000 Subject: [PATCH] Maintenance: OBFUSCATE_SOURCE_ARRAY_CHAR/_BYTE(text, key) (std::array of the encrypted text, built by the consteval Obfuscator) and encodedLiterals rules for the OBFUSCATE_SOURCE* macros, so raw encrypted byte arrays can be written as their cleartext. No unit uses them yet. --- Source/Utility/Cipher/Obfuscate.h | 3 +++ data/decomp.json | 32 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/Source/Utility/Cipher/Obfuscate.h b/Source/Utility/Cipher/Obfuscate.h index 2988fe19f..2df1c550b 100644 --- a/Source/Utility/Cipher/Obfuscate.h +++ b/Source/Utility/Cipher/Obfuscate.h @@ -89,6 +89,9 @@ namespace utility { return name.Text(); \ }(__VA_ARGS__) +#define OBFUSCATE_SOURCE_ARRAY_CHAR(text, key) ::utility::Obfuscator(text).Array() +#define OBFUSCATE_SOURCE_ARRAY_BYTE(text, key) ::utility::Obfuscator(text).Array() + #define OBFUSCATE_ARRAY(text, key, element) \ []() -> EncryptedName& { \ OBFUSCATE_NAME_ARRAY_(text, key, element, name); \ diff --git a/data/decomp.json b/data/decomp.json index 756ab7ae8..8178dfcee 100644 --- a/data/decomp.json +++ b/data/decomp.json @@ -87,6 +87,38 @@ "kind": "xor-repeating-key", "keyBytes": 8, "includeTerminator": true + }, + { + "macro": "OBFUSCATE_SOURCE_ARRAY_CHAR", + "kind": "xor-repeating-key", + "keyBytes": 8, + "includeTerminator": true + }, + { + "macro": "OBFUSCATE_SOURCE_ARRAY_BYTE", + "kind": "xor-repeating-key", + "keyBytes": 8, + "includeTerminator": true + }, + { + "macro": "OBFUSCATE_SOURCE", + "kind": "xor-repeating-key", + "keyBytes": 8, + "includeTerminator": true + }, + { + "macro": "OBFUSCATE_SOURCE_CHARS", + "kind": "xor-repeating-key", + "keyBytes": 8, + "includeTerminator": true, + "lengthArgument": true + }, + { + "macro": "OBFUSCATE_SOURCE_BYTES", + "kind": "xor-repeating-key", + "keyBytes": 8, + "includeTerminator": true, + "lengthArgument": true } ], "matchPolicy": {