I’ve found out what my issue was. I was reading binary files, and char arrays end at null characters ('\0'), which binary files may have.
I found out that I can use a QByteArray all the way instead of an array of chars, resulting in a more readable that works regardless of the null characters in the binary file:
const qint64 CHUNK_SIZE = 9728000;
ioDevice.seek(0);
QByteArray data = ioDevice.read(CHUNK_SIZE);
QByteArray hash = QCryptographicHash::hash(data, QCryptographicHash::Md4);
std::cout << "ioDevice.read() hash: " << hash.toHex().toStdString() << std::endl;