$php_mysql$ Posted November 2, 2010 Share Posted November 2, 2010 which would be secured to use friends? or could we use both together? show some usage example please Link to comment https://forums.phpfreaks.com/topic/217586-md5-or-salt/ Share on other sites More sharing options...
$php_mysql$ Posted November 2, 2010 Author Share Posted November 2, 2010 $salt ="1234567890abcdefghijklmnopqrstuvwxyz"; $pass = md5($pass,$salt); is that the right way to do it? Link to comment https://forums.phpfreaks.com/topic/217586-md5-or-salt/#findComment-1129587 Share on other sites More sharing options...
Alex Posted November 2, 2010 Share Posted November 2, 2010 It would be more like: $pass = md5($pass . $salt); Link to comment https://forums.phpfreaks.com/topic/217586-md5-or-salt/#findComment-1129590 Share on other sites More sharing options...
$php_mysql$ Posted November 2, 2010 Author Share Posted November 2, 2010 thanks bro and for login auth how could i use it? Link to comment https://forums.phpfreaks.com/topic/217586-md5-or-salt/#findComment-1129592 Share on other sites More sharing options...
Psycho Posted November 2, 2010 Share Posted November 2, 2010 thanks bro and for login auth how could i use it? Exactly the same way you create it. You take the password the user enters on login and apply the EXACT same hashing/salting algorithym and compare it to the value in the database. I would highly suggest creating a single function to create your hashed value to use when storing new password and for comparing passwords at login. That will ensure you are doing exactly the same thing in both instances. Link to comment https://forums.phpfreaks.com/topic/217586-md5-or-salt/#findComment-1129596 Share on other sites More sharing options...
$php_mysql$ Posted November 2, 2010 Author Share Posted November 2, 2010 thanks bro and for login auth how could i use it? Exactly the same way you create it. You take the password the user enters on login and apply the EXACT same hashing/salting algorithym and compare it to the value in the database. I would highly suggest creating a single function to create your hashed value to use when storing new password and for comparing passwords at login. That will ensure you are doing exactly the same thing in both instances. thanks that was a good suggestion Link to comment https://forums.phpfreaks.com/topic/217586-md5-or-salt/#findComment-1129599 Share on other sites More sharing options...
A1SURF.us Posted November 2, 2010 Share Posted November 2, 2010 This answers most of my questions on MD5. I knew it was this simple to modify the hashing technique. I noticed tons of beginning coders have the same problem with hashing in the forum and worldwide. Link to comment https://forums.phpfreaks.com/topic/217586-md5-or-salt/#findComment-1129618 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.