Defines the contract for a database of malicious signatures.
More...
#include <interfaces.h>
|
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.
|
|
Defines the contract for a database of malicious signatures.
◆ ~IHashDatabase()
virtual scanner::IHashDatabase::~IHashDatabase |
( |
| ) |
|
|
virtualdefault |
◆ 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
-
hash | The hash string to look up. |
- Returns
- An optional containing the verdict if the hash is found, otherwise std::nullopt.
Implemented in scanner::CsvHashDatabase.
◆ Load()
virtual size_t scanner::IHashDatabase::Load |
( |
const std::filesystem::path & |
source_path | ) |
|
|
pure virtual |
Loads malicious signatures from a source.
- Parameters
-
source_path | The path to the data source (e.g., a CSV file). |
- Returns
- The number of signatures successfully loaded.
- Exceptions
-
std::runtime_error | on failure to open or parse the source. |
Implemented in scanner::CsvHashDatabase.
The documentation for this interface was generated from the following file: