|
Posted by Chris Shiflett on 12/16/05 00:21
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/
Navigation:
[Reply to this message]
|