Quote Originally Posted by Guest View Post
It also seems that alongside your char array, you have introduced a std::string as a buffer into your program. What is the motivation for this?

If you'd rather work with std::string, you can read your file into it as well.
Code:
constexpr size_t buffer_size = 1<<20;
string buffer(buffer_size, '\0'); // construct to size
fin.read(&buffer.front(), buffer_size);
It was too make the xor function compatible with the rest of the system.