Open macvip opened 6 years ago
My code definitely needs improvements for the latest versions of compilers
I had the same symptoms, so I thought this library actually does not support compile time obfuscation. Thanks for letting me know that this is a compiler dependent issue.
@MeroZemory It is dependent of the compiler you are using, its version and the compilation flags. (It was written more than 3 years...)
@andrivet Thank you for writing such a library. I was exploring instruction-level obfuscation techniques so this isn't related to what I was looking for, but it was great to get the first idea of running FSM based on predicates :)
@MeroZemory It is dependent of the compiler you are using, its version and the compilation flags. (It was written more than 3 years...)
Can you addapt it for VS 2019?
I will update this code once we have good support of C++20 in the major compilers (VS, Clang and GCC). This is currently not the case. More specifically, what I am waiting for is "string literal operator template" support.
I will update this code once we have good support of C++20 in the major compilers (VS, Clang and GCC). This is currently not the case. More specifically, what I am waiting for is "string literal operator template" support.
Thx for faster than light answer. So, VS 20 would got major updates?
VS 20 does not exist so I can't answer.
Visual Studio 2022 came out today, which claims to have proper C++20 support. Is a MetaString rewrite still planned? 👼
Yes (when ? when I can find some time)
Using MetaString<1, K, Indexes<I...>>, compile with VS 2017 ver 15.7.1, disassemble and you'll find constexpr not working as supposed. As a result, the strings are obfuscated at runtime. For some unknown reason, the compiler regards the position I as a variant not a const value though it can be and indeed is produced at compile-time.
After several tries, an ugly template function fools the compiler to obfuscate string at compile-time.