in reply to Cookies & Encryption

Sounds like your problem isn't really with encrypting, it's with saving the result as a cookie. If so, be sure to URLencode the result of the encryption before saving as a cookie, then URLdecode before unencrypting it.