[PHP] encrypt and dcrypt

2005-12-15 Thread ganu
Hi , I want a function like md5() by which I can encrypt a code and again when I need from db i can dcrypt also. but in md5() this func. is not there. I can not go in reverse way. I want to use it both the ways. Help me , 10x. (Thnx.)... -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] encrypt and dcrypt

2005-12-15 Thread Ray Hauge
I think base64 would work for you. http://us3.php.net/manual/en/function.base64-encode.php http://us3.php.net/manual/en/function.base64-decode.php Ray ganu wrote: Hi , I want a function like md5() by which I can encrypt a code and again when I need from db i can dcrypt also. but in

Re: [PHP] encrypt and dcrypt

2005-12-15 Thread Chris Shiflett
ganu wrote: I want a function like md5() by which I can encrypt a code and again when I need from db i can dcrypt also. but in md5() this func. is not there. I can not go in reverse way. If a simple PHP function could encrypt and decrypt data with no arguments other than the string, anyone

Re: [PHP] encrypt and dcrypt

2005-12-15 Thread Aaron Koning
Ganu, Are you simply looking to use the md5 string for authentication? If so you don't need to retrieve the decrypted version, simply encrypt what the user submits and compare the two md5 strings. Aaron On 12/15/05, Chris Shiflett [EMAIL PROTECTED] wrote: ganu wrote: I want a function like

Re: [PHP] encrypt and dcrypt

2005-12-15 Thread Anas Mughal
I use TriCrypt to encrypt simple strings. It supports two directional. http://www.fiacre.net/phpcode.php (Code available at http://www.fiacre.net/download/TriCrypt.txt) Sample: Original String=World Encrypted String=Nx9yJu I haven't gotten around at figuring out how do I make the code produce