![]() |
LicenseSpring C++ SDK
7.31.0
Easily add Software Licensing to your application
|
#include <iostream>
Go to the source code of this file.
Classes | |
class | LicenseSpring::Xor_string< size, Char > |
Namespaces | |
LicenseSpring | |
Macros | |
#define | TBX_XSTR_SEED |
#define | Random_LCG() linear_congruent_generator(10) |
#define | XSTR_RANDOM_NUMBER(Min, Max) (Min + (Random_LCG() % (Max - Min + 1))) |
#define | XorS(name, my_string) constexpr LicenseSpring::Xor_string<(sizeof(my_string)/sizeof(char)), char> name(my_string) |
#define | XorString(my_string) []{ constexpr LicenseSpring::Xor_string<(sizeof(my_string)/sizeof(char)), char> expr(my_string); return expr; }().decrypt() |
#define | XorWS(name, my_string) constexpr LicenseSpring::Xor_string<(sizeof(my_string)/sizeof(wchar_t)), wchar_t> name(my_string) |
#define | XorWideString(my_string) []{ constexpr LicenseSpring::Xor_string<(sizeof(my_string)/sizeof(wchar_t)), wchar_t> expr(my_string); return expr; }().decrypt() |
#define | EncryptStr(s) XorString(s) |
Encrypts c-string at compile time. More... | |
#define | EncryptWStr(s) XorWideString(s) |
Encrypts wide (wchar_t) string at compile time. More... | |
Functions | |
constexpr unsigned long long | LicenseSpring::linear_congruent_generator (unsigned rounds) |
template<typename Char > | |
constexpr Char | LicenseSpring::encrypt_character (const Char character, int index) |
Variables | |
constexpr const unsigned long long | LicenseSpring::XORKEY = XSTR_RANDOM_NUMBER(0, 0xFF) |
#define TBX_XSTR_SEED |
Definition at line 17 of file EncryptString.h.
#define Random_LCG | ( | ) | linear_congruent_generator(10) |
Definition at line 35 of file EncryptString.h.
#define XSTR_RANDOM_NUMBER | ( | Min, | |
Max | |||
) | (Min + (Random_LCG() % (Max - Min + 1))) |
Definition at line 36 of file EncryptString.h.
#define XorS | ( | name, | |
my_string | |||
) | constexpr LicenseSpring::Xor_string<(sizeof(my_string)/sizeof(char)), char> name(my_string) |
Definition at line 79 of file EncryptString.h.
#define XorString | ( | my_string | ) | []{ constexpr LicenseSpring::Xor_string<(sizeof(my_string)/sizeof(char)), char> expr(my_string); return expr; }().decrypt() |
Definition at line 80 of file EncryptString.h.
#define XorWS | ( | name, | |
my_string | |||
) | constexpr LicenseSpring::Xor_string<(sizeof(my_string)/sizeof(wchar_t)), wchar_t> name(my_string) |
Definition at line 82 of file EncryptString.h.
#define XorWideString | ( | my_string | ) | []{ constexpr LicenseSpring::Xor_string<(sizeof(my_string)/sizeof(wchar_t)), wchar_t> expr(my_string); return expr; }().decrypt() |
Definition at line 83 of file EncryptString.h.
#define EncryptStr | ( | s | ) | XorString(s) |
Encrypts c-string at compile time.
Please note this macro does not work for global (static) strings This feature may require C++14. In order to enable C++14 in the Xcode navigate to Targets->MyTarget->Build Settings->Apple Clang - Language - C++ -> C++ Language Dialect and set GNU++14 or C++14.
s | input string. |
Definition at line 92 of file EncryptString.h.
#define EncryptWStr | ( | s | ) | XorWideString(s) |
Encrypts wide (wchar_t) string at compile time.
Please note this macro does not work for global (static) strings This feature may require C++14. In order to enable C++14 in the Xcode navigate to Targets->MyTarget->Build Settings->Apple Clang - Language - C++ -> C++ Language Dialect and set GNU++14 or C++14.
s | input string. |
Definition at line 101 of file EncryptString.h.