On Thu, 04 Mar 2004 12:46:51 -0600, Mignon Hunter wrote:

>Can anyone recommend, or does anyone have handy, a script that will encrypt passwords 
>AND then also be able to retrieve the encrypted password.  
>
>Checking out the docs and some books has confused me mostly.
>
>Thx
>

Yes and no.

$pw = md5("password");   works well.

However, you cannot decrypt.

You store $pw (above) in the database and when a user wants to log in, you encrypt 
their entry and compare it to the value -- also encrypted -- stored in the db.  If 
there is a match, they get in; but you have no knowledge of their password(s).  
Neither does anyone else who hacks in.

hth,
Doug

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to