New topic: How do I store an MD5 encrypted password
<http://forums.realsoftware.com/viewtopic.php?t=46896> Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message dgdavidge Post subject: How do I store an MD5 encrypted passwordPosted: Sun Feb 10, 2013 1:48 pm Joined: Fri Jun 02, 2006 1:43 pm Posts: 183 Location: Santa Ynez, CA I am trying to store a password in a MySQL database after using the RS MD5 function to encrypt it. I use a prepared statement to store it using BindType MYSQL_TYPE_BLOB and the database column is VarBinary. When I try to log in using the same password, the MD5 of the password textfield does not match the password in the recordset. Using phpMyAdmin to view the value in the database reveals a 32 byte hexidecimal number. Looking at the MD5 of the textfield in the debugger shows a mix of ASCII and weird symbols. I have the MD5 result through the EncodeHex function and got a result that is not close the the database value. What is the best way to store an MD5 value? Top DaveS Post subject: Re: How do I store an MD5 encrypted passwordPosted: Sun Feb 10, 2013 1:55 pm Joined: Sun Aug 05, 2007 10:46 am Posts: 4523 Location: San Diego, CA Store it as as a BASE64 encoded MD5 value then when user enters password... create a BASE64 MD5 encoded version of what they typed in and compare it to the string value in your table. check_value=ENCODEBASE64(MD5(password),0) No need to decode the base64 _________________ Dave Sisemore MacPro, OSX Lion 10.7.4 RB2012r1 Note : I am not interested in any solutions that involve custom Plug-ins of any kind Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 2 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
