MCPcopy Create free account
hub / github.com/YACReader/yacreader / pseudoHash

Function pseudoHash

YACReaderLibrary/library_creator.cpp:362–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

360}
361
362QString pseudoHash(const QFileInfo &fileInfo)
363{
364 QCryptographicHash crypto(QCryptographicHash::Sha1);
365 QFile file(fileInfo.absoluteFilePath());
366 file.open(QFile::ReadOnly);
367 crypto.addData(file.read(524288));
368 file.close();
369 // hash Sha1 del primer 0.5MB + filesize
370 return QString(crypto.result().toHex().constData()) + QString::number(fileInfo.size());
371}
372
373void LibraryCreator::insertComic(const QString &relativePath, const QFileInfo &fileInfo)
374{

Callers 2

insertComicMethod · 0.85
replaceComicMethod · 0.85

Calls 4

QStringClass · 0.70
openMethod · 0.45
closeMethod · 0.45
resultMethod · 0.45

Tested by

no test coverage detected