The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

For a future project, I will need to encrypt a string of characters (both letters and numbers). I need a high-security way to do this. What is a good encryption method to use that is already in PHP or can be easily added?

The application I'm developing will need to be able to decrypt an encrypted string it receives. I looked up the crypt function, but it says that "There is no decrypt function, since crypt() uses a one-way algorithm."

I need to be able to receive a string and decrypt it with the key that I (earlier) encoded it with. Anyone know how to do that?

If you really need high standard encryption that you can rely on it may be worth using something like PGP (Pretty Good Privacy) or the GNU alternative. There is an excellent tutorial on using these packages with PHP here: