Move Lexicon*, Text (TextTokens, TextEscapes, Base64), Math/RadialGrid, Hash (MD5, XxHash32) and Cipher (Rijndael, XorBytes) into Source/Utility subfolders; update includes, guards, compile.json and CMakeLists.txt. Backfill // OFFSET: above every standalone // FUNCTION: block (89 IDs, addresses from the symbol database) and make it mandatory in CODING_RULES.md and AGENTS.md. Remove the MatchLexicon cast chain.
11 lines
314 B
C++
11 lines
314 B
C++
#include "Utility/Cipher/XorBytes.h"
|
|
|
|
namespace utility {
|
|
// OFFSET: 0x005A45E0
|
|
// FUNCTION: fn_03149
|
|
void XorBytes(std::uint8_t* bytes, std::uint64_t length, std::uint64_t key) {
|
|
for (std::uint64_t i = 0; i < length; ++i) {
|
|
bytes[i] ^= static_cast<std::uint8_t>(key >> (8 * (i & 7)));
|
|
}
|
|
}
|
|
}
|