Orionsbelter Posted July 25, 2009 Share Posted July 25, 2009 Hello, i have to accept a http post on my website and the hashed string they send to me is in CAPITALS but my hash string isn't. how would i turn this code into CAPITALS $MD5=md5($fulStr); Link to comment https://forums.phpfreaks.com/topic/167391-md5-hash-capitals-help/ Share on other sites More sharing options...
Garethp Posted July 25, 2009 Share Posted July 25, 2009 $TempString = mysql_escape_string($_POST['Temp']);; $TempString = strtolower($TempString); $TempString = md5($TempString); Never forget to Sanitize Link to comment https://forums.phpfreaks.com/topic/167391-md5-hash-capitals-help/#findComment-882624 Share on other sites More sharing options...
ignace Posted July 25, 2009 Share Posted July 25, 2009 $CAPITAL_MD5 = strtoupper($MD5); Link to comment https://forums.phpfreaks.com/topic/167391-md5-hash-capitals-help/#findComment-882627 Share on other sites More sharing options...
ignace Posted July 25, 2009 Share Posted July 25, 2009 .. $TempString = strtolower($TempString); .. strtolower() are you sure? Link to comment https://forums.phpfreaks.com/topic/167391-md5-hash-capitals-help/#findComment-882629 Share on other sites More sharing options...
Garethp Posted July 25, 2009 Share Posted July 25, 2009 .. $TempString = strtolower($TempString); .. strtolower() are you sure? Yup. They're sending it to him in capitals, and he needs to compare that string to an md5 of the same string, but in lower case Link to comment https://forums.phpfreaks.com/topic/167391-md5-hash-capitals-help/#findComment-882638 Share on other sites More sharing options...
.josh Posted July 25, 2009 Share Posted July 25, 2009 doesn't matter...either strtolower the value being sent or else strtoupper what you are comparing it to. Tom-ay-to Tom-ah-to. Link to comment https://forums.phpfreaks.com/topic/167391-md5-hash-capitals-help/#findComment-882699 Share on other sites More sharing options...
Daniel0 Posted July 25, 2009 Share Posted July 25, 2009 $TempString = mysql_escape_string($_POST['Temp']);; $TempString = strtolower($TempString); $TempString = md5($TempString); Never forget to Sanitize I'm sure MD5 appreciates you're trying to protect it from SQL injections... Link to comment https://forums.phpfreaks.com/topic/167391-md5-hash-capitals-help/#findComment-882747 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.