Re: encrypt and dcrypt

From: Date: Thu, 15 Dec 2005 22:21:13 +0000
Subject: Re: encrypt and dcrypt
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-227501@lists.php.net to get a copy of this message
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 could decrypt your data. In other words, it can't be as simple as md5(). You might find the code samples at the bottom of this page helpful: http://phpsecurity.org/code They primarily cover using mcrypt. There's also an article by Robert Peake that's pretty good: http://www.phpmag.net/itr/online_artikel/psecom,id,667,nodeid,114.html Hope that helps. Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/

« previous php.general (#227501) next »