Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QT md5 != php md5 ?
QtWS25 Last Chance

QT md5 != php md5 ?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 4.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Aicou
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      You compare apples and oranges:

      098f6bcd4621d373cade4e832627b4f6 is the MD5 of "test"

      63a740d6a48b52d109c65d726af9a698 is the MD5 of "iiFFaa42"

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Aicou
        wrote on last edited by
        #3

        ho ...
        ...

        fixed
        sorry

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved