You may not call main recursively, as you do in this program. In fact, this can probably overflow the stack if used repeatedly.
Using 'system' to call cls and pause is ugly, fragile, and a potential security vulnerability. (If I know that your program is run with elevated privileges, because it is used to encrypt certain files, then I can put a program with he name 'pause' or 'cls' in the same directory, and have that program be run instead of the one you intend; the titular vulnerability in the book
The Cuckoo's Egg is very similar.)
You do not flush (by using std::endl instead of '\n' or otherwise) the output stream at times when you should - it is usually line-buffered, which is why it probably appears to work, but it does not have to be.
Function 'Base' has too many responsibilities and should be split up, separating input/output and actual computation.
You seed the random number generator far more often than you need or probably should do.
I'm not at all sure that you realize that fstreams use
RAII.
---
I'm not trying to be mean, but XOR encryption is a pretty standard beginner task - it's also very impractical, which is why it's not generally used in the real world - and I thought feedback on your code would be more useful. All the same, good job for completing a project which someone is finding useful!