rodecomp/Source/Utility/Cipher/XorBytes.cpp
ragnarok-clanker bf6a44c117 Group Utility units into subsystem folders and require OFFSET provenance
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.
2026-10-26 23:41:07 +01:00

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)));
}
}
}