LIEF: Library to Instrument Executable Formats Version 0.16.0
Loading...
Searching...
No Matches
DEX/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_DEX_HASH_H
17#define LIEF_DEX_HASH_H
18
19#include "LIEF/visibility.h"
20#include "LIEF/hash.hpp"
21
22namespace LIEF {
23class Object;
24
25namespace DEX {
26
27class Class;
28class Field;
29class File;
30class Header;
31class MapItem;
32class MapList;
33class Method;
34class Prototype;
35class CodeInfo;
36class Type;
37class LIEF_API Hash : public LIEF::Hash {
41 public:
42 static LIEF::Hash::value_type hash(const Object& obj);
43
44 public:
45 using LIEF::Hash::Hash;
47
48 public:
49 void visit(const File& file) override;
50 void visit(const Header& header) override;
51 void visit(const Class& cls) override;
52 void visit(const Field& field) override;
53 void visit(const Method& method) override;
54 void visit(const CodeInfo& code_info) override;
55 void visit(const Type& type) override;
56 void visit(const Prototype& type) override;
57 void visit(const MapItem& item) override;
58 void visit(const MapList& list) override;
59
60 ~Hash() override;
61};
62
63}
64}
65
66#endif
Class which represents a DEX Class (i.e. a Java/Kotlin class)
Definition DEX/Class.hpp:36
Definition CodeInfo.hpp:33
Class which represent a DEX Field.
Definition Field.hpp:34
Class that represents a DEX file.
Definition DEX/File.hpp:39
Class which implements a visitor to compute a deterministic hash for LIEF DEX objects.
Definition DEX/hash.hpp:40
void visit(const Header &header) override
Method to visit a LIEF::DEX::Header.
void visit(const Type &type) override
Method to visit a LIEF::DEX::Type.
void visit(const Field &field) override
Method to visit a LIEF::DEX::Field.
void visit(const Method &method) override
Method to visit a LIEF::DEX::Method.
void visit(const MapList &list) override
Method to visit a LIEF::DEX:MapList:
void visit(const CodeInfo &code_info) override
Method to visit a LIEF::DEX::CodeInfo.
static LIEF::Hash::value_type hash(const Object &obj)
void visit(const Prototype &type) override
Method to visit a LIEF::DEX:Prototype:
void visit(const Class &cls) override
Method to visit a LIEF::DEX::Class.
void visit(const File &file) override
Method to visit a LIEF::DEX::File.
~Hash() override
void visit(const MapItem &item) override
Method to visit a LIEF::DEX:MapItem:
Class which represents the DEX header. This is the first structure that begins the DEX format.
Definition DEX/Header.hpp:39
Class which represents an element of the MapList object.
Definition MapItem.hpp:31
Class which represents the map_list structure that follows the main DEX header.
Definition MapList.hpp:37
Class which represents a DEX::Method.
Definition DEX/Method.hpp:36
Class which represents a DEX method prototype.
Definition Prototype.hpp:29
Class which represents a DEX type as described in the format specifications: https://source....
Definition DEX/Type.hpp:33
size_t value_type
Definition hash.hpp:33
virtual void visit(const Object &)
Definition Object.hpp:25
Definition DEX/Class.hpp:30
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41