note 6500 modified in crypt by ronabop

From: Date: Sat, 09 Sep 2000 02:43:43 +0000
Subject: note 6500 modified in crypt by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-4580@lists.php.net to get a copy of this message
I see some of you are looking for encrypted passes but also want the copy in the db to be able to be accessed.... now im no security expert or anything, so i dont know if this is secure enough for ya, but what ive found is that if you pull a copy of the users password from a db and crypt it then match that to the crypted pass from the form you should be able to match them or not.... ie: /* you found this at php.net under crypt forum */ /* your db search goes here.... select * from where id = '$user' */ $mysql_pass = urlencode(crypt(mysql_result($result,0,"pass"),32)); if ($mysql_pass == $encrypted_pass){ $logged = 1; } this way you can show the encrypted pass in the history and not be able to decipher what it is.... adam http://www.php.net/manual/function.crypt.php

« previous php.notes (#4580) next »