| openPilotLog

Public Member Functions | Public Attributes | List of all members
AHash Class Reference

The AHash class is responsible for calculating cryptographic hashes of files (used to verify downloads) More...

`#include <ahash.h>`

## Public Member Functions
| AHash (QFileInfo &file_info)
| AHash - calculates the MD5-checksum for the parameter given in the constructor and saves the result in the checksum member variable.
const QString | hashToHex ()
| hashString returns a hex representation of the hash
bool | compare (QFileInfo &md5_file)
| compare reads the pre-calculated md5-sum from a checkfile and compares the hashes. More...

## Public Attributes
QByteArray | checksum

## Detailed Description

The AHash class is responsible for calculating cryptographic hashes of files (used to verify downloads)

## Member Function Documentation

## ◆ compare()

bool AHash::compare | ( | QFileInfo & | md5_file | ) |

compare reads the pre-calculated md5-sum from a checkfile and compares the hashes.

Parameters

  md5_file | - the checkfile containing the md5 checksum in hex format

Returns
  true if hashes match

The documentation for this class was generated from the following files:

- src/classes/ahash.h
- src/classes/ahash.cpp