18 mutable char mValue[
sizeof...(Index) + 1];
19 mutable bool mEncrypted =
true;
26 for(std::size_t
t = 0;
t <
sizeof...(Index);
t++) {
27 mValue[
t] = mValue[
t] ^ (XORKEY +
t);
29 mValue[
sizeof...(Index)] =
'\0';
37 template<
typename T>
static constexpr T linearCongruentGenerator(
T rounds)
noexcept {
41 template<
typename T>
static constexpr T random()
noexcept {
return linearCongruentGenerator(10); }
42 template<
typename T>
static constexpr T randomNumber(
T minimum,
T maximum)
noexcept {
return minimum + (
random<T>() % (maximum - minimum + 1)); }
45 static constexpr char encryptCharacter(
const char character,
const std::size_t index)
noexcept {
return character ^ (XORKEY + index); }
48#define CE_ENCRYPTED_STRING(X, String) ::CeresEngine::EncryptedString<std::make_index_sequence<sizeof(String) - 1>> X(String);
Definition EncryptedString.hpp:15
Definition Application.hpp:19
constexpr UInt32 staticHash32(BasicStringView< T > string, const UInt32 value=0x811c9dc5) noexcept
Definition Hash.hpp:77
BasicStringView< char > StringView
Narrow string view used for handling narrow encoded text in UTF-8.
Definition String.hpp:190
@ Index
Index buffer type.
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25