well I remember one of my 1st programs was a text editor that saves everything but encrpyted.
how I did that was using a loop to go through each character and convert it to the ascii code, then I used the Xor statement and other mathematical operations to play with the numbers. Just make sure it's reversible.
In my program I also made sure that one of the mathematical operators was a number in an inputbox which they will require to decrypt it.
to decrypt it, just reverse the order and the statements.
for example. someone types a letter.
make the letter "letter$", and make the code that the user typed in "code". for larger statements, just make a loop going through each letter and do something like this.
Code:
Print #1, ((Asc(letter$) Xor code) * 5 - 15)
and to decrypt.
Input #1, Number
Code:
DecryptedLetter = ((Chr$(Number Xor code) + 15) / 5)
and for the sentance
Code:
decrpytedsentance = decryptedsentance & decryptedletter
And there you go, simple Encryption and Decryption
just add to the equation to make it stronger if you want.
When someone opens it in Notepad or something, it will just be a whole bunch of numbers.
my program it even makes those numbers 2 decimal places and 4 digits at least, which makes it disorientating.
Also just a suggestion. When making the file, don't call it .txt
make a different extension so it will look like a random file which could be anything.
give it a .enc or anything, doesn't matter at all.
another tip would be to make every 2nd or 3rd character a false character which will be checked, so if people randomly deletes numbers, it will make sure to corrupt the file and will stop any tampering.
Create like 3 or 4 of these files, with different extensions and hide them all over windows as backups as well. so the actual user can still get in.