File Scanner 1.0.0
A high-performance C++ malicious file scanner.
Loading...
Searching...
No Matches
scanner::IFileHasher Interface Referenceabstract

Defines the contract for a component that can hash a file's content. More...

#include <interfaces.h>

Inheritance diagram for scanner::IFileHasher:
Inheritance graph
Collaboration diagram for scanner::IFileHasher:
Collaboration graph

Public Member Functions

virtual ~IFileHasher ()=default
 
virtual std::string HashFile (const std::filesystem::path &file_path)=0
 Calculates the hash of a given file.
 

Detailed Description

Defines the contract for a component that can hash a file's content.

Constructor & Destructor Documentation

◆ ~IFileHasher()

virtual scanner::IFileHasher::~IFileHasher ( )
virtualdefault

Member Function Documentation

◆ HashFile()

virtual std::string scanner::IFileHasher::HashFile ( const std::filesystem::path &  file_path)
pure virtual

Calculates the hash of a given file.

Parameters
file_pathThe path to the file to be hashed.
Returns
A string representing the hexadecimal hash of the file.
Exceptions
std::runtime_errorif the file cannot be opened or read.

Implemented in scanner::Md5FileHasher.

Here is the caller graph for this function:

The documentation for this interface was generated from the following file: