File Scanner 1.0.0
A high-performance C++ malicious file scanner.
|
An implementation of IFileHasher that calculates MD5 hashes. More...
#include <md5_file_hasher.h>
Public Member Functions | |
std::string | HashFile (const std::filesystem::path &file_path) override |
Calculates the MD5 hash of a given file. | |
![]() | |
virtual | ~IFileHasher ()=default |
An implementation of IFileHasher that calculates MD5 hashes.
This class uses a streaming approach to handle files of any size without consuming large amounts of memory. It is an internal, non-exported class.
|
overridevirtual |
Calculates the MD5 hash of a given file.
Opens the file and reads it in chunks, feeding them into the MD5 algorithm.
file_path | The path to the file to be hashed. |
std::runtime_error | if the file cannot be opened. |
std::ios_base::failure | on stream reading errors. |
Implements scanner::IFileHasher.