Possible Duplicate:
Best way to use PHP to encrypt and decrypt?
I am new in Two Way crypting technology in PHP. I have used sha512 as one way hashing, but now I really need two way ecryption. and I don't know where to start. Can you tell me which method I must use for the most security? and can you give me simple "hello world" example?
Edited
Thank you for all answers, I found mCrypt as an key for my problem, but I can use a lot of methods like MCRYPT_3DES, MCRYPT_CAST_128, MCRYPT_CAST_256.... so what to use?