diff --git a/sample/string_obfs.cpp b/sample/string_obfs.cpp index 730b788..05a9410 100644 --- a/sample/string_obfs.cpp +++ b/sample/string_obfs.cpp @@ -3,11 +3,11 @@ #include template -constexpr char xor(char c) { +constexpr char enc_xor(char c) { return c ^ key; } int main() { - constexpr auto str = obfs::make_string, xor<0x50>>("Hello World !"); + constexpr auto str = obfs::make_string, enc_xor<0x50>>("Hello World !"); std::cout << str.decode() << std::endl; } \ No newline at end of file diff --git a/test/impl/string_obfs.cpp b/test/impl/string_obfs.cpp index 9f95292..0377dc8 100644 --- a/test/impl/string_obfs.cpp +++ b/test/impl/string_obfs.cpp @@ -2,12 +2,12 @@ #include template -constexpr char xor(char value) { +constexpr char enc_xor(char value) { return value ^ Key; } TEST_CASE("xor test", "[obfs::String]") { REQUIRE( - obfs::make_string, xor<0x50>>("Hello World !").decode() + obfs::make_string, enc_xor<0x50>>("Hello World !").decode() == std::string_view("Hello World !")); } \ No newline at end of file