ID:28169
 
Keywords: encryption
Well I was going through my folders and I found an enryption program I have written. There seems to be few people currently releasing these types of things, so I might as well put it out there now. By the way, this is very compacted and un-readable code as you can tell; I could not find the original non-compacted version. However, if anyone is interested I may rewrite it to make it more readable.

How it works:
It works off of the ascii values of whatever you are encrypting, so obviously this method wouldn't work for anything other than ascii characters. It takes a text string, and a text key and creates a string of seeming random numbers.

To do this, the function goes letter by letter and finds the ascii value of the current letter, the previous letter, and the ascii value of a letter in the pass key. (The letter in the pass key is chossen using modular division: a%length(key) where a is the current letters position in the original word.) These values are then added together and create the string of numbers. It may not be the most secure method, but it works well enough if you pick a good enough key.

encrypt_src.zip
Thanks for releasing the source, this will allow me to use client sided saving without too much fear of players editing.
And so will this, but with a far stronger encryption algorithm.
Popisfizzy wrote:
And so will this, but with a far stronger encryption algorithm.

Very true, this wasn't meant to be used for anything serious. Just a little experiment.