LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
Abstract/hash.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2024 R. Thomas
2 * Copyright 2017 - 2024 Quarkslab
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#ifndef LIEF_ABSTRACT_HASH_H
17#define LIEF_ABSTRACT_HASH_H
18
19#include "LIEF/visibility.h"
20#include "LIEF/hash.hpp"
21
22namespace LIEF {
23class Binary;
24class Header;
25class Relocation;
26class Object;
27
28class LIEF_API AbstractHash : public LIEF::Hash {
29 public:
30 static LIEF::Hash::value_type hash(const Object& obj);
31
32 public:
33 using LIEF::Hash::Hash;
35
36 public:
37 void visit(const Binary& binary) override;
38 void visit(const Header& header) override;
39 void visit(const Section& section) override;
40 void visit(const Symbol& symbol) override;
41 void visit(const Relocation& relocation) override;
42 void visit(const Function& function) override;
43
44 ~AbstractHash() override;
45};
46
47}
48
49#endif
Definition Abstract/hash.hpp:28
void visit(const Header &header) override
Method to visit a LIEF::Header.
void visit(const Function &function) override
Method to visit a LIEF::Function.
void visit(const Section &section) override
Method to visit a LIEF::Section.
void visit(const Relocation &relocation) override
Method to visit a LIEF::Relocation.
~AbstractHash() override
void visit(const Binary &binary) override
Method to visit a LIEF::Binary.
static LIEF::Hash::value_type hash(const Object &obj)
void visit(const Symbol &symbol) override
Method to visit a LIEF::Symbol.
Abstract binary that exposes an uniform API for the different executable file formats.
Definition Abstract/Binary.hpp:49
size_t value_type
Definition hash.hpp:33
virtual void visit(const Object &)
Definition Abstract/Header.hpp:40
Definition Object.hpp:25
Class which represents an abstracted Relocation.
Definition Abstract/Relocation.hpp:27
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41