The following Decrypt code has some issues. It does not give any errors, but the plaintext is not returned either. The corresponding Encrypt code is working fine.
Are you fond of that particular encryption method or are you just want any type of encryption? I have a code sample online at http://www.daniweb.com/code/snippet217409.html with examples of encrypt and decrypt routines.