LIEF: Library to Instrument Executable Formats
Version 1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
lief-install
x86_64
static
include
LIEF
VDEX
VDEX/Parser.hpp
Go to the documentation of this file.
1
/* Copyright 2017 - 2026 R. Thomas
2
* Copyright 2017 - 2026 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_VDEX_PARSER_H
17
#define LIEF_VDEX_PARSER_H
18
19
#include <memory>
20
#include <vector>
21
#include <string>
22
23
#include "
LIEF/VDEX/type_traits.hpp
"
24
#include "
LIEF/visibility.h
"
25
26
namespace
LIEF
{
27
class
VectorStream
;
28
namespace
VDEX
{
29
class
File
;
30
32
class
LIEF_API
Parser
{
33
public
:
34
static
std::unique_ptr<File>
parse
(
const
std::string& file);
35
static
std::unique_ptr<File>
parse
(
const
std::vector<uint8_t>& data,
36
const
std::string& name =
""
);
37
38
Parser
&
operator=
(
const
Parser
& copy) =
delete
;
39
Parser
(
const
Parser
& copy) =
delete
;
40
41
private
:
42
Parser
();
43
Parser
(
const
std::string& file);
44
Parser
(
const
std::vector<uint8_t>& data,
const
std::string& name);
45
virtual
~Parser
();
46
47
void
init(
const
std::string& name,
vdex_version_t
version
);
48
49
template
<
typename
VDEX_T>
50
void
parse_file();
51
52
template
<
typename
VDEX_T>
53
void
parse_header();
54
55
template
<
typename
VDEX_T>
56
void
parse_checksums();
57
58
template
<
typename
VDEX_T>
59
void
parse_dex_files();
60
61
template
<
typename
VDEX_T>
62
void
parse_verifier_deps();
63
64
template
<
typename
VDEX_T>
65
void
parse_quickening_info();
66
67
LIEF::VDEX::File
* file_ =
nullptr
;
68
std::unique_ptr<VectorStream> stream_;
69
};
70
71
}
// namespace VDEX
72
}
// namespace LIEF
73
#endif
type_traits.hpp
LIEF::VDEX::File
Main class for the VDEX module which represents a VDEX file.
Definition
VDEX/File.hpp:42
LIEF::VDEX::Parser::operator=
Parser & operator=(const Parser ©)=delete
LIEF::VDEX::Parser::parse
static std::unique_ptr< File > parse(const std::vector< uint8_t > &data, const std::string &name="")
LIEF::VDEX::Parser::parse
static std::unique_ptr< File > parse(const std::string &file)
LIEF::VDEX::Parser::Parser
Parser(const Parser ©)=delete
LIEF::VectorStream
Definition
VectorStream.hpp:29
LIEF::VDEX
Definition
OAT/Binary.hpp:31
LIEF::VDEX::version
vdex_version_t version(const std::string &file)
Return the VDEX version of the given file.
LIEF::VDEX::vdex_version_t
uint32_t vdex_version_t
Definition
VDEX/type_traits.hpp:28
LIEF
LIEF namespace.
Definition
Abstract/Binary.hpp:40
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:41
Generated by
1.17.0