The xor_string<CharType, ...> struct manages the encrypted data. Key methods include:
size(): Returns the string size in characters (excluding the null terminator).crypt(): Runs the encryption/decryption algorithm on the internal storage in-place.get(): Returns a const_pointer or pointer to the storage without modifying it.crypt_get(): Runs crypt() and returns a pointer to the decrypted internal storage.
struct xor_string<CharType, ...> {
using size_type = std::size_t;
using value_type = CharT;
using pointer = value_type*;
using const_pointer = const value_type*;
// Returns string size in characters, not including null terminator.
constexpr size_type size() const;
// Runs the encryption/decryption algorithm on the internal storage.
void crypt() noexcept;
// Returns const pointer to the storage, without doing any modifications to it.
const_pointer get() const;
// Returns non const pointer to the storage, without doing any modifications to it.
pointer get();
// Runs crypt() and returns the pointer to the internal storage.
pointer crypt_get();
}