refactor: move util::Xor to Obfuscation().Xor

This is meant to focus the usages to narrow the scope of the obfuscation optimization.

`Obfuscation::Xor` is mostly a move.

Co-authored-by: maflcko <6399679+maflcko@users.noreply.github.com>
This commit is contained in:
Lőrinc
2025-07-05 13:39:15 +02:00
parent fa5d296e3b
commit 377aab8e5a
5 changed files with 26 additions and 28 deletions

View File

@@ -4,7 +4,6 @@
#include <bench/bench.h>
#include <random.h>
#include <streams.h>
#include <util/obfuscation.h>
#include <cstddef>
@@ -18,7 +17,7 @@ static void ObfuscationBench(benchmark::Bench& bench)
size_t offset{0};
bench.batch(data.size()).unit("byte").run([&] {
util::Xor(data, key, offset++); // mutated differently each time
Obfuscation().Xor(data, key, offset++); // mutated differently each time
ankerl::nanobench::doNotOptimizeAway(data);
});
}