Hello.

First program I've made when I started playing on multipayer servers was encryption program(to protect against stealing).

This program encrypts and decrypts all files (expect itself and startup). Files can contain any chars.

How does it work?

EncodedChar = bit.bxor( Char, string.byte( Password, PositionOfCharInFile % string.len(Password) + 1 ) )

This equation is used for each character in the file.
When program is encrypting files, it creates new file _TMSG that contain test massage which will be used to validate password.

Pastebin:

http://pastebin.com/Ls0vEppN

Screenshots:

Spoiler


download downloads given program from my dropbox.

I can share this if someone wants it.


File before and after encrypting.