LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
LIEF::DEX::Header Class Reference

Class which represents the DEX header. This is the first structure that begins the DEX format. More...

#include <Header.hpp>

Inheritance diagram for LIEF::DEX::Header:
Collaboration diagram for LIEF::DEX::Header:

Public Types

using location_t = std::pair<uint32_t, uint32_t>
 
using magic_t = std::array<uint8_t, 8>
 
using signature_t = std::array<uint8_t, 20>
 
- Public Types inherited from LIEF::Object
template<class T >
using output_t = add_pointer_t<decay_t<T>>
 
template<class T >
using output_const_t = add_pointer_t<add_const_t<decay_t<T>>>
 

Public Member Functions

 Header ()
 
 Header (const Header &)
 
Headeroperator= (const Header &)
 
template<class T >
 Header (const T &header)
 
magic_t magic () const
 The DEX magic bytes (DEX\n followed by the DEX version)
 
uint32_t checksum () const
 The file checksum.
 
signature_t signature () const
 SHA-1 DEX signature (which is not really used as a signature)
 
uint32_t file_size () const
 Size of the entire file (including the current the header)
 
uint32_t header_size () const
 Size of this header. It should be 0x70.
 
uint32_t endian_tag () const
 File endianess of the file.
 
uint32_t map () const
 Offset from the start of the file to the map list (see: DEX::MapList)
 
location_t strings () const
 Offset and size of the string pool.
 
location_t link () const
 
location_t types () const
 
location_t prototypes () const
 
location_t fields () const
 
location_t methods () const
 
location_t classes () const
 
location_t data () const
 
uint32_t nb_classes () const
 
uint32_t nb_methods () const
 
void accept (Visitor &visitor) const override
 
 ~Header () override
 
- Public Member Functions inherited from LIEF::Object
 Object ()
 
 Object (const Object &other)
 
Objectoperator= (const Object &other)
 
template<class T >
output_t< T > as ()
 
template<class T >
output_const_t< T > as () const
 
virtual bool operator== (const Object &other) const
 
virtual bool operator!= (const Object &other) const
 
virtual ~Object ()
 

Detailed Description

Class which represents the DEX header. This is the first structure that begins the DEX format.

The official documentation is provided here: https://source.android.com/devices/tech/dalvik/dex-format#header-item

Member Typedef Documentation

◆ location_t

using LIEF::DEX::Header::location_t = std::pair<uint32_t, uint32_t>

◆ magic_t

using LIEF::DEX::Header::magic_t = std::array<uint8_t, 8>

◆ signature_t

using LIEF::DEX::Header::signature_t = std::array<uint8_t, 20>

Constructor & Destructor Documentation

◆ Header() [1/3]

LIEF::DEX::Header::Header ( )

◆ Header() [2/3]

LIEF::DEX::Header::Header ( const Header & )

◆ Header() [3/3]

template<class T >
LIEF::DEX::Header::Header ( const T & header)

◆ ~Header()

LIEF::DEX::Header::~Header ( )
override

Member Function Documentation

◆ accept()

void LIEF::DEX::Header::accept ( Visitor & visitor) const
overridevirtual

Implements LIEF::Object.

◆ checksum()

uint32_t LIEF::DEX::Header::checksum ( ) const

The file checksum.

◆ classes()

location_t LIEF::DEX::Header::classes ( ) const

◆ data()

location_t LIEF::DEX::Header::data ( ) const

◆ endian_tag()

uint32_t LIEF::DEX::Header::endian_tag ( ) const

File endianess of the file.

◆ fields()

location_t LIEF::DEX::Header::fields ( ) const

◆ file_size()

uint32_t LIEF::DEX::Header::file_size ( ) const

Size of the entire file (including the current the header)

◆ header_size()

uint32_t LIEF::DEX::Header::header_size ( ) const

Size of this header. It should be 0x70.

◆ link()

location_t LIEF::DEX::Header::link ( ) const

◆ magic()

magic_t LIEF::DEX::Header::magic ( ) const

The DEX magic bytes (DEX\n followed by the DEX version)

◆ map()

uint32_t LIEF::DEX::Header::map ( ) const

Offset from the start of the file to the map list (see: DEX::MapList)

◆ methods()

location_t LIEF::DEX::Header::methods ( ) const

◆ nb_classes()

uint32_t LIEF::DEX::Header::nb_classes ( ) const

◆ nb_methods()

uint32_t LIEF::DEX::Header::nb_methods ( ) const

◆ operator=()

Header & LIEF::DEX::Header::operator= ( const Header & )

◆ prototypes()

location_t LIEF::DEX::Header::prototypes ( ) const

◆ signature()

signature_t LIEF::DEX::Header::signature ( ) const

SHA-1 DEX signature (which is not really used as a signature)

◆ strings()

location_t LIEF::DEX::Header::strings ( ) const

Offset and size of the string pool.

◆ types()

location_t LIEF::DEX::Header::types ( ) const

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