Hello;
I write alot of RPG's and I have had a little problem with players checking out my text files to get info on the game of modify saved characters and the like, hey I can't blame them I might do the same thing so I came up with a couple of functions to scramble the text and descramble it. Hope you find it useful
a$="There once was a little girl named sue"
b$=encrypt(a$,47)
print a$;" encrypted is: "; b$
c$=decrypt(b$,47)
print:print
print b$; " decrypted is: ";c$
suspend for key
end
function encrypt(line$,code)
return_string$=""
for a = 1 to len(line$)
m=asc(mid$(line$,a))+code
x$=chr$(m)
return_string$=return_string$+x$
next a
endfunction return_string$
function decrypt(line$,code)
return_string$=""
for a = 1 to len(line$)
m=asc(mid$(line$,a))-code
x$=chr$(m)
return_string$=return_string$+x$
next a
endfunction return_string$
Assuming your text is just standard characters such as those represented on the keyboard a value of -30 to 127 should be safe for the encryption key. I use the encrypter in a utility to load the file rename it and then save it scrambled. Tell me what ya think