February 18, 2011

Aicou Aicou
Lab Rat
17 posts

QT md5 != php md5 ?

 

Hello,

I just start to use the QCryptographicHash class for a project who has to use a database with password stored by php in md5.

for simple string like “test” the results are the same. But with string like “iiFFaa42” it’s wrong.

I use Qt like that : std::string hash = QCryptographicHash::hash(“test”,QCryptographicHash::Md5).toHex().constData();
and php like that : md5(“test”);

for exemple my result for the string “iiFFaa42” are :
php: 63a740d6a48b52d109c65d726af9a698
qt: 098f6bcd4621d373cade4e832627b4f6

thanks for your time

2 replies

February 18, 2011

Volker Volker
Robot Herder
5428 posts

You compare apples and oranges:

098f6bcd4621d373cade4e832627b4f6 is the MD5 of “test”

63a740d6a48b52d109c65d726af9a698 is the MD5 of “iiFFaa42”

February 18, 2011

Aicou Aicou
Lab Rat
17 posts

ho …

fixed
sorry

 
  ‹‹ Icons are not visible when installing Qt application on end user machine(Windows) Why?      Can’t QImage save BMPs with 16 bits color depth? ››

You must log in to post a reply. Not a member yet? Register here!