Defines the contract for a component that can hash a file's content.
More...
#include <interfaces.h>
|
| virtual | ~IFileHasher ()=default |
| |
| virtual std::string | HashFile (const std::filesystem::path &file_path)=0 |
| | Calculates the hash of a given file.
|
| |
Defines the contract for a component that can hash a file's content.
◆ ~IFileHasher()
| virtual scanner::IFileHasher::~IFileHasher |
( |
| ) |
|
|
virtualdefault |
◆ HashFile()
| virtual std::string scanner::IFileHasher::HashFile |
( |
const std::filesystem::path & |
file_path | ) |
|
|
pure virtual |
Calculates the hash of a given file.
- Parameters
-
| file_path | The path to the file to be hashed. |
- Returns
- A string representing the hexadecimal hash of the file.
- Exceptions
-
| std::runtime_error | if the file cannot be opened or read. |
Implemented in scanner::Md5FileHasher.
The documentation for this interface was generated from the following file: