


Adding or changing a single bit (just a one or zero) will change the result completely. Sha1Generator.addData(data) // or, please try with checksum algorithms are very sensitive to data changes. Md5Generator.addData(data) // or, please try with nstData() QModelIndex indexSeDest = filemodel->index(indexVoidDest.data(QFileSystemModel::FilePathRole).toString() + "/" + meant something like data(file.readAll()) QString StringSe = (string + "/" + item.baseName()) +"Sha1 value: " + sha1Generator.result().toHex() + "") įilemodel->mkdir(indexVoidDest,item.fileName()) +"Md5 value: " + md5Generator.result().toHex() + "" QString list = QString("File name: " + fileNameCopy + "" QCryptographicHash sha1Generator(QCryptographicHash::Sha1) QCryptographicHash md5Generator(QCryptographicHash::Md5) QDir destination(indexVoidDest.data(QFileSystemModel::FilePathRole).toString()) ĭtFileName(destination.filePath(fileNameCopy)) QDir dir(string) foreach(const QFileInfo item, dir.entryInfoList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot | QDir::Hidden | QDir::System))
#Hashtab compare a file code#
xlsx, I cannot get the correct md5 value and sha1 value.īelow is my code snippet for my MainWindow::copy(QString string, QModelIndex indexVoidDest) I managed to get the md5 value and sha1 value for only.
