Simplest is use string to byte array, perform some logical operation on the
resulting array, convert that byte array back to a string and that's what
you save. When you load the file back, perform the inverse logical operation
to recover the file.
The easiest is to use "not" in which case you can use the same function to
retrieve the file. This does however preserve the "symbol order" of the
original file and is essentially a straight substitutional cipher that could
be broken if there's enough text and enough determination. If you want a bit
more security, feed the byte array into a loop along with some arbitrary
text, use your "key" text to mangle the data, making sure your key wraps
when you get to the end of it, and then the file becomes much more difficult
to
break.
Tom Byers wrote in message
news:3a83026b@newsgroups.ni.com...
> I would like to save a password file to disk but want to have the text
data
> in it encrypted. Any ideas??
> Thanks, -Tom
>
>
>