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.

This commit is contained in:
ragnarok-clanker 2026-11-12 17:14:52 +00:00
commit f765698a58
2 changed files with 35 additions and 0 deletions

View file

@ -89,6 +89,9 @@ namespace utility {
return name.Text(); \
}(__VA_ARGS__)
#define OBFUSCATE_SOURCE_ARRAY_CHAR(text, key) ::utility::Obfuscator<sizeof(text), key>(text).Array<char>()
#define OBFUSCATE_SOURCE_ARRAY_BYTE(text, key) ::utility::Obfuscator<sizeof(text), key>(text).Array<std::uint8_t>()
#define OBFUSCATE_ARRAY(text, key, element) \
[]() -> EncryptedName<sizeof(text), key>& { \
OBFUSCATE_NAME_ARRAY_(text, key, element, name); \

View file

@ -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": {