openPilotLog
Md5Sum Class Reference

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

#include <md5sum.h>

Public Member Functions

 Md5Sum (QFileInfo &file_info)
 AHash - calculates the MD5-checksum for the input file specified in the constructor and saves the result in the checksum member variable.
 
const QString hashToHex () const
 hashString returns a hex representation of the hash
 
bool compare (QFileInfo &md5_file) const
 compare reads the pre-calculated md5-sum from a checkfile and compares the hashes. More...
 

Public Attributes

QByteArray checksum
 

Detailed Description

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

Member Function Documentation

◆ compare()

bool Md5Sum::compare ( QFileInfo &  md5_file) const

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: