Short encryption and decryption functions in PHP
Occasionally, when writing php tools, you run in to something you'd like encrypted and/or decrypted. You could just use openssl_encrypt, but you're not using php 5.3, so you have to use mcrypt.
Here's bit of code I've used a few times. Feel free to use it, it comes with absolutely no warranty. Read more about Short encryption and decryption functions in PHP
