note 6500 deleted from function.crypt by jimw

From: Date: Sat, 03 Nov 2001 18:17:16 +0000
Subject: note 6500 deleted from function.crypt by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-20369@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

« previous php.notes (#20369) next »