-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhashcalculator.h
More file actions
36 lines (29 loc) · 876 Bytes
/
hashcalculator.h
File metadata and controls
36 lines (29 loc) · 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef HASHCALCULATOR_H
#define HASHCALCULATOR_H
#include <QString>
#include <QByteArray>
#include <QFile>
#include <openssl/md5.h>
#include <openssl/sha.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
class HashCalculator {
public:
HashCalculator(QString filename);
~HashCalculator();
bool calculateHashes(const QString& fileName);
QString getMD5() const;
QString getSHA512() const;
QString getSHA256() const;
QString getSSDeep() const;
private:
QString m_md5;
QString m_sha512;
QString m_sha256;
QString m_ssdeep;
void calculateMD5(const unsigned char* data, size_t length);
void calculateSHA512(const unsigned char* data, size_t length);
void calculateSHA256(const unsigned char* data, size_t length);
void calculateSSDeep(const unsigned char* data, size_t length);
};
#endif // HASHCALCULATOR_H