Generating a MD5 Hash with Qt

后端 未结 1 809
耶瑟儿~
耶瑟儿~ 2021-02-01 01:24

I am trying to generate an MD5 hash with Qt. The hash I generate needs to be compatible with other standard MD5 hashes generated with other languages such as PHP.

This

相关标签:
1条回答
  • 2021-02-01 02:00

    PHP gives it to you in hex, Qt in binary. Convert it to hex using QByteArray::toHex.

    QString blah = QString(QCryptographicHash::hash(("myPassword"),QCryptographicHash::Md5).toHex())
    
    0 讨论(0)
提交回复
热议问题