If you want to encrypt your content that's not really easy. The easy way is x-oring (which prevents a user from directly seeing the content, but is in no way secure), the hard way would be DES for example. Btw. I think the advantages of text files are underestimated. This way you can do quick changes to the files, easily import and export the data and it is really usefull for debugging purposes. And I am talking out of experience here. (You don't need to write the delimit_str between the vars, just at the end of the string.)


Writing a var to a file, that cannot be directly read could be acchieved this way:
Code:

function fileVarWrite(fileHandle, variable)
{
file_asc_write(fileHandle,(variable >> 14) & 255);
file_asc_write(fileHandle,(variable >> 6) & 255);
file_asc_write(fileHandle,(variable << 2) & 255);
file_asc_write(fileHandle,(variable >> 10) & 255);
}
function fileVarRead(fileHandle)
{
var ret;
ret = 0;
ret = ret | (file_asc_read(fileHandle) << 14);
ret = ret | (file_asc_read(fileHandle) << 6);
ret = ret | (file_asc_read(fileHandle) >> 2);
ret = ret | (file_asc_read(fileHandle) >> 10);
return(ret);
}


I know this can be coded much more efficient. I just wrote it this way to make it more demonstrative. Maybe it works exactly this way, maybe you have to do minor adjustments. I have not tested it, just proven it correct... Using this method every var needs exactly 32 bit, the same consumption as in random access memory and the cipher cannot be read directly. I hope this helps...


Always learn from history, to be sure you make the same mistakes again...