Hi,
What is a simple but fairly secure algorithm for encrypting text files?
That depends on how hard you want to work and who you want
to hide the text from. Dave's idea is good if you want to hide text
from someone that is not very informed about cryptography. Though
I would add punctuation symbols and white space. That can create
simple text files, so you do not have to worry about binary files.
Another simple process is to exclusive or your text with a pattern
generated by a pass phrase. Prompt for the pass phrase, AND it
with 01FH to preserve the high bits of the text file, and exclusive or
the phrase with your text file. Don't use a very short phrase though.
To recover the original text, repeat the process with the same pass
phrase.
Either of those algorithms will encrypt your text against most people.
If you want to hide text from more knowledgeable people, you will
need a better algorithm.
Regards,
Steve N.