JustasMasiulis / xorstr

heavily vectorized c++17 compile time string encryption.
Apache License 2.0
1.21k stars 194 forks source link

Compile problem #4

Closed mq1n closed 6 years ago

mq1n commented 6 years ago

hello, there are have some compile problems with long strings and/or special chars, e.g;

printf(xorstr("There has to be an exception throw on InitLogger (spdlog::spdlog_ex)\n").crypt_get());

Error (active) E0135 class "jm::detail::stringbuilder<char, jm::detail::tstring, 'T', 'h', 'e', 'r', 'e', ' ', 'h', 'a', 's', ' ', 't', 'o', ' ', 'b', 'e', ' ', 'a', 'n', ' ', 'e', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n', ' ', 't', 'h', 'r', 'o', 'w', ' ', 'o', 'n', ' ', 'I', 'n', 'i', 't', 'L', 'o', 'g', 'g', 'e', 'r', ' ', '(', 's', 'p', 'd', 'l', 'o', 'g', ':', ':', 's', 'p', 'd', 'l', 'o', 'g', '_', 'e', 'x', ')', '\n', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000'>" has no member "type" ConsoleApplication1 C:\Users\Koray\Desktop\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.cpp 12

*printf(xorstr("SELECT FROM __InstanceCreationEvent WITHIN 1 WHERE TargetInstance ISA 'Win32_Process'").crypt_get());**

Error (active) E0135 class "jm::detail::stringbuilder<char, jm::detail::tstring, 'S', 'E', 'L', 'E', 'C', 'T', ' ', '*', ' ', 'F', 'R', 'O', 'M', ' ', '', '', 'I', 'n', 's', 't', 'a', 'n', 'c', 'e', 'C', 'r', 'e', 'a', 't', 'i', 'o', 'n', 'E', 'v', 'e', 'n', 't', ' ', 'W', 'I', 'T', 'H', 'I', 'N', ' ', '1', ' ', 'W', 'H', 'E', 'R', 'E', ' ', 'T', 'a', 'r', 'g', 'e', 't', 'I', 'n', 's', 't', 'a', 'n', 'c', 'e', ' ', 'I', 'S', 'A', ' ', '\'', 'W', 'i', 'n', '3', '2', '_', 'P', 'r', 'o', 'c', 'e', 's', 's', '\'', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000'>" has no member "type" ConsoleApplication1 C:\Users\Koray\Desktop\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.cpp 12

IDE: Visual studio 2017(17134 SDK toolset)

JustasMasiulis commented 6 years ago

Will look into this

JustasMasiulis commented 6 years ago

I am able to compile these examples without any problems. I think you may have mistaken the intellisense errors with actual compiler errors.

In the library there currently is a hard limit of 99 characters IIRC so I may raise that if needed, but you don't seem to be hitting it yet.

Concerning special chars there was a bug with encoding extended ASCII characters that should have been fixed some time ago.

mq1n commented 6 years ago

Yes, looks like it's a intellisense problem the code successfully compiled and running but I don't get it why it happens as error.

JustasMasiulis commented 6 years ago

Eh. Intellisense is sketchy rather often. I guess I can close this now?