Ok this is somewhat of a second related post of my other one "C++ File". There is no need to read the other post just want to tell you.
I want to make a console app that does the XOR thing I heard about using the simple ifstream and ofstream ( well simple compared to win programing). This isn't the first time Ive heard about it; I just can't find any hard/good documentation on it.
Thanks in advance.
Edit: I want to actualy save a file with this.

Edited by Zssffssz: Muffins

5 Years
Discussion Span
Last Post by doug65536

I want to make a console app that does the XOR thing

What's the "XOR thing"? There are a whole bunch of encryption techniques which use XORing, but it's not the whole algorithm.

I heard about using the simple ifstream and ofstream

If you're looking for ifstream and ofstream documentation, here's some...


Here's a tutorial.


I'm not sure precisely what you're looking for, so these are pretty generic links.


Real encryption algorithms (symmetric ones anyway) are mostly based on an extrememly strong random number generator that can be "seeded", which means made to generate the same sequence of random numbers, given a seed, often called the key.

You take those extremely random numbers and xor them with the data, giving you seemingly completely random output. When decrypting, you use the key again, seed the random number generator with the same seed (key), and do the xor operation again on the encrypted data. Doing an xor again on the encrypted data with the same number will undo the original xor (that you did when encrypting) into the original data.

Is this what you mean?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.