#ifndef FASTHASHCALCULATOR_H
#define FASTHASHCALCULATOR_H

#include <QHash>
#include <QMutex>
#include <QObject>
#include <QFile>
#include <QDirIterator>
#include <Data/typesDataServerClient.h>
#include "tools.h"

class FastHashCalculator : public QObject
{
    Q_OBJECT
public:
    explicit FastHashCalculator(QObject *parent = nullptr);
    void calculateHashes(QString path);
    QList<FileData> *getHashList() const;

signals:
    void finished();

private:
    QByteArray calculateFileHashOptimized(const QString &filePath);
    void calculateSingleHash(const QString &filePath);

    QList<FileData>* hashList;
    QMutex _mutex;
};

#endif // FASTHASHCALCULATOR_H
