String Encryption Class (AS2)

Hi,

I was bored today and as I like making classes I thought I’d make one! Basically with this you can encrypt a string using a ‘key’ which turns your string into lots of unreadable characters…then when you want to decode the encrypted string you must use the same key otherwise you’ll get a whole heap of mess :hugegrin:

There is a usage example within the AS file to show you how it works. Please make sure you put the file in the correct place. This is only version 1.0 so there is room for improvement; I also plan to convert this into AS3 at some point. (If you want to feel free…it’ll save me a job)

I’m not really quite sure what you might use this for but I’m sure someone can think of something! Anyhoo…have fun!

EDIT

22-02: Moved variables into the function as requested by Sirisian
22-02: Added MD5 encryption

lewi-p