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

Defines the contract for a database of malicious signatures. More...

#include <interfaces.h>

Inheritance diagram for scanner::IHashDatabase:
Inheritance graph
Collaboration diagram for scanner::IHashDatabase:
Collaboration graph

Public Member Functions

virtual ~IHashDatabase ()=default
 
virtual size_t Load (const std::filesystem::path &source_path)=0
 Loads malicious signatures from a source.
 
virtual std::optional< std::string > FindHash (const std::string &hash) const =0
 Looks up a hash to see if it is in the database.
 

Detailed Description

Defines the contract for a database of malicious signatures.

Constructor & Destructor Documentation

◆ ~IHashDatabase()

virtual scanner::IHashDatabase::~IHashDatabase ( )
virtualdefault

Member Function Documentation

◆ FindHash()

virtual std::optional< std::string > scanner::IHashDatabase::FindHash ( const std::string &  hash) const
pure virtual

Looks up a hash to see if it is in the database.

Parameters
hashThe hash string to look up.
Returns
An optional containing the verdict if the hash is found, otherwise std::nullopt.

Implemented in scanner::CsvHashDatabase.

Here is the caller graph for this function:

◆ Load()

virtual size_t scanner::IHashDatabase::Load ( const std::filesystem::path &  source_path)
pure virtual

Loads malicious signatures from a source.

Parameters
source_pathThe path to the data source (e.g., a CSV file).
Returns
The number of signatures successfully loaded.
Exceptions
std::runtime_erroron failure to open or parse the source.

Implemented in scanner::CsvHashDatabase.


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