mirror of
https://github.com/revsic/cpp-obfuscator
synced 2026-06-08 17:08:30 +00:00
13 lines
313 B
C++
13 lines
313 B
C++
#include <string_obfs.hpp>
|
|
#include <catch2/catch.hpp>
|
|
|
|
template <char Key>
|
|
constexpr char xor(char value) {
|
|
return value ^ Key;
|
|
}
|
|
|
|
TEST_CASE("xor test", "[obfs::String]") {
|
|
REQUIRE(
|
|
obfs::make_string<xor<0x50>, xor<0x50>>("Hello World !").decode()
|
|
== std::string_view("Hello World !"));
|
|
} |