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); Quote 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 Quote 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); Quote 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? Quote 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 Quote 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. Quote 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... Quote Link to comment https://forums.phpfreaks.com/topic/167391-md5-hash-capitals-help/#findComment-882747 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.