# openPilotLog: src/classes/ahash.h Source File

ahash.h
#ifndef AHASH_H
#define AHASH_H
#include <QtCore>
#include <QByteArray>
#include <QCryptographicHash>
class AHash
{
public:
AHash(QFile &file);
AHash(QFileInfo &file_info);
QByteArray checksum;
inline const QString hashToHex()
{
return QString(checksum.toHex());
};
bool compare(QFileInfo &md5_file);
};
#endif // AHASH_H
AHash::compare
bool compare(QFileInfo &md5_file)
compare reads the pre-calculated md5-sum from a checkfile and compares the hashes.
Definition: ahash.cpp:39
AHash::AHash
AHash(QFile &file)
AHash - calculates the MD5-checksum for the parameter given in the constructor and saves the result i...
Definition: ahash.cpp:4
AHash::hashToHex
const QString hashToHex()
hashString returns a hex representation of the hash
Definition: ahash.h:26
AHash
The AHash class is responsible for calculating cryptographic hashes of files (used to verify download...
Definition: ahash.h:10