I wanted to use fstream to read a txt file.
fstream
I am using inFile >> characterToConvert, but the problem is that this omits any spaces an
inFile >> characterToConvert
For encryption, you should probably use read(). Encryption algorithms usually deal with fixed-size blocks. Oh, and to open in binary mode (no translation frmo \n\r to \n), pass ios_base::binary as the second parameter to constructor or open() call.