dan_t Posted April 30, 2010 Share Posted April 30, 2010 When you use an md5 or sha1 hash, is there a way to have the user enter it twice to be sure they made their correct password or does the hash make them impossible to compare? Basically, are the hashes random numbers that wouldn't match twice? Link to comment https://forums.phpfreaks.com/topic/200315-comparing-passwords/ Share on other sites More sharing options...
Lamez Posted April 30, 2010 Share Posted April 30, 2010 like so: if( md5($pass1) === md5($pass2)) echo "Match"; //or if the pass is already hash'd if( md5($pass) === $hashPass) echo "Match"; Link to comment https://forums.phpfreaks.com/topic/200315-comparing-passwords/#findComment-1051248 Share on other sites More sharing options...
dan_t Posted April 30, 2010 Author Share Posted April 30, 2010 I suppose in a very big way, that's a dumb question. They have to know to approve entry or whatever, but here's the question - how do you do it? if(md5$password == md5$password); Maybe? Link to comment https://forums.phpfreaks.com/topic/200315-comparing-passwords/#findComment-1051252 Share on other sites More sharing options...
dan_t Posted April 30, 2010 Author Share Posted April 30, 2010 OK, Thanks! Link to comment https://forums.phpfreaks.com/topic/200315-comparing-passwords/#findComment-1051255 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.