Hi,
I'm using Qt 5.10.0 and have the following code:
QCryptographicHash sha3(QCryptographicHash::Sha3_256);
sha3.addData("aaa", 3)
QByteArray hash = sha3.result().toHex();
Now hash is empty. The same produces a hash with Sha1 (or Sha256 or Keccak_256) . Am I doing something obviously wrong? I cannot really believe it's simply not working anymore.
I wanted to upgrade from SHA-1 to SHA-3 since SHA-1 is considered compromised now. I guess for now I move to Sha256.
Edit: Actually, I still had a Qt5Core.dll version 5.9.1 in my project. I replaced that with 5.10.0 and now it's working. So, it was 5.9.1 that didn't produce a SHA-3 hash.
Bookmarks