A basic virtual class for std::string encryption:
class EncryptionBase
{
public:
virtual std::string encrypt(const std::string& file, const std::string& password = {}) = 0;
virtual std::string decrypt(const std::string& file, const std::string& password = {}) = 0;
virtual ~EncryptionBase() = default;
};
Encryption logic using XOR:
class XOREncryption : public EncryptionBase ...
Class for file encryption using encryption:
class FileEncryptHandler ...