Re: encrypt and dcrypt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <shiflett@xxxxxxx> wrote:
>
> 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/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux