Moron Posted August 26, 2009 Share Posted August 26, 2009 I have a php program where an employee enters their employee number as username and the last four of their SSN as the password. These two parameters match MS SQL database fields. The problem is that this is sent in clear text. I need it to be encrypted. I looked into just using AD authentication, but the concept doesn't seem to like me very much. So is there a simple way to encrypt the passwords between the php input form and the database? Thanks! Link to comment https://forums.phpfreaks.com/topic/172003-is-there-an-easy-way-to-encrypt-passwords/ Share on other sites More sharing options...
bluebyyou Posted August 26, 2009 Share Posted August 26, 2009 http://us3.php.net/md5 Link to comment https://forums.phpfreaks.com/topic/172003-is-there-an-easy-way-to-encrypt-passwords/#findComment-906940 Share on other sites More sharing options...
Goldeneye Posted August 26, 2009 Share Posted August 26, 2009 As bluebyyou posted, use the MD5() function. Encrypt the values in the database and then encrypt the form-input after it's been submitted. If the two encrypted values match, execute your code, otherwise throw the user an error. Link to comment https://forums.phpfreaks.com/topic/172003-is-there-an-easy-way-to-encrypt-passwords/#findComment-906943 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.