Hi all,
I need a md5 sum of a file with a big size. I found this:
QFile file("/home/chris/backup.img");
QByteArray hashData
= QCryptographicHash
::hash(fileData, QCryptographicHash
::Md5);
qDebug() << hashData.toHex();
}
QFile file("/home/chris/backup.img");
if (file.open(QIODevice::ReadOnly)) {
QByteArray fileData = file.readAll();
QByteArray hashData = QCryptographicHash::hash(fileData, QCryptographicHash::Md5);
qDebug() << hashData.toHex();
}
To copy to clipboard, switch view to plain text mode
but with a file size > 8 GB it's a memory overkill!
Are there any other methods?
Thanks!
Chris
Bookmarks