This code is based on RavuAlHemio/cpptotp.
This software comes with ABSOLUTELY NO WARRANTY and it isn’t safe to use if you really want to encrypt something, because XOR encryption isn’t strong and the OTP key is stored as a string in the compiled object code.
Visit this site and generate an OTP key.
In the file encrypt.cpp you will find a variable named key: insert your key between the quotes.
You can use an OTP app, such as Google Authenticator (iOS and Android) on your phone to validate the OTP request on your PC.
Clone and compile with cmake:
git clone https://github.com/LukeRPi/xor_otp_encrypt.git
cd xor_otp_encrypt
mkdir build
cd build
cmake ..
make