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

This class represents the PDB Checksum debug entry which is essentially an array of bytes representing the checksum of the PDB content. More...

#include <PDBChecksum.hpp>

Inheritance diagram for LIEF::PE::PDBChecksum:
Collaboration diagram for LIEF::PE::PDBChecksum:

Public Types

enum class  HASH_ALGO : uint32_t { UNKNOWN = 0 , SHA256 }
 
- Public Types inherited from LIEF::PE::Debug
enum class  TYPES {
  UNKNOWN = 0 , COFF = 1 , CODEVIEW = 2 , FPO = 3 ,
  MISC = 4 , EXCEPTION = 5 , FIXUP = 6 , OMAP_TO_SRC = 7 ,
  OMAP_FROM_SRC = 8 , BORLAND = 9 , RESERVED10 = 10 , CLSID = 11 ,
  VC_FEATURE = 12 , POGO = 13 , ILTCG = 14 , MPX = 15 ,
  REPRO = 16 , PDBCHECKSUM = 19 , EX_DLLCHARACTERISTICS = 20
}
 The entry types. More...
 
- 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

 PDBChecksum (HASH_ALGO algo, std::vector< uint8_t > hash)
 
 PDBChecksum (const details::pe_debug &dbg, Section *sec, HASH_ALGO algo, std::vector< uint8_t > hash)
 
 PDBChecksum (const PDBChecksum &other)=default
 
PDBChecksumoperator= (const PDBChecksum &other)=default
 
 PDBChecksum (PDBChecksum &&)=default
 
PDBChecksumoperator= (PDBChecksum &&other)=default
 
std::unique_ptr< Debugclone () const override
 
span< const uint8_t > hash () const
 Hash of the PDB content.
 
span< uint8_t > hash ()
 
void hash (std::vector< uint8_t > h)
 
HASH_ALGO algorithm () const
 Algorithm used for hashing the PDB content.
 
void algorithm (HASH_ALGO algo)
 
 ~PDBChecksum () override=default
 
std::string to_string () const override
 
- Public Member Functions inherited from LIEF::PE::Debug
 Debug ()=default
 
 Debug (TYPES type)
 
 Debug (const details::pe_debug &debug_s, Section *section)
 
 Debug (const Debug &other)=default
 
Debugoperator= (const Debug &other)=default
 
 Debug (Debug &&)=default
 
Debugoperator= (Debug &&)=default
 
 ~Debug () override=default
 
uint32_t characteristics () const
 Reserved should be 0.
 
uint32_t timestamp () const
 The time and date when the debug data was created.
 
uint16_t major_version () const
 The major version number of the debug data format.
 
uint16_t minor_version () const
 The minor version number of the debug data format.
 
TYPES type () const
 The format DEBUG_TYPES of the debugging information.
 
uint32_t sizeof_data () const
 Size of the debug data.
 
uint32_t addressof_rawdata () const
 Address of the debug data relative to the image base.
 
uint32_t pointerto_rawdata () const
 File offset of the debug data.
 
const Sectionsection () const
 The section where debug data is located.
 
Sectionsection ()
 
span< uint8_t > payload ()
 Debug data associated with this entry.
 
span< const uint8_t > payload () const
 
void characteristics (uint32_t characteristics)
 
void timestamp (uint32_t timestamp)
 
void major_version (uint16_t major_version)
 
void minor_version (uint16_t minor_version)
 
void sizeof_data (uint32_t sizeof_data)
 
void addressof_rawdata (uint32_t addressof_rawdata)
 
void pointerto_rawdata (uint32_t pointerto_rawdata)
 
template<class T >
const Tas () const
 
template<class T >
Tas ()
 
void accept (Visitor &visitor) const 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 ()
 

Static Public Member Functions

static std::unique_ptr< PDBChecksumparse (const details::pe_debug &hdr, Section *section, span< uint8_t > payload)
 
static bool classof (const Debug *debug)
 
- Static Public Member Functions inherited from LIEF::PE::Debug
static span< uint8_t > get_payload (Section &section, uint32_t rva, uint32_t offset, uint32_t size)
 
static span< uint8_t > get_payload (Section &section, const details::pe_debug &hdr)
 
static span< uint8_t > get_payload (Section &section, const Debug &dbg)
 

Detailed Description

This class represents the PDB Checksum debug entry which is essentially an array of bytes representing the checksum of the PDB content.

Member Enumeration Documentation

◆ HASH_ALGO

enum class LIEF::PE::PDBChecksum::HASH_ALGO : uint32_t
strong
Enumerator
UNKNOWN 
SHA256 

Constructor & Destructor Documentation

◆ PDBChecksum() [1/4]

LIEF::PE::PDBChecksum::PDBChecksum ( HASH_ALGO algo,
std::vector< uint8_t > hash )
inline

References LIEF::hash().

◆ PDBChecksum() [2/4]

LIEF::PE::PDBChecksum::PDBChecksum ( const details::pe_debug & dbg,
Section * sec,
HASH_ALGO algo,
std::vector< uint8_t > hash )
inline

References LIEF::hash().

◆ PDBChecksum() [3/4]

LIEF::PE::PDBChecksum::PDBChecksum ( const PDBChecksum & other)
default

◆ PDBChecksum() [4/4]

LIEF::PE::PDBChecksum::PDBChecksum ( PDBChecksum && )
default

◆ ~PDBChecksum()

LIEF::PE::PDBChecksum::~PDBChecksum ( )
overridedefault

Member Function Documentation

◆ algorithm() [1/2]

HASH_ALGO LIEF::PE::PDBChecksum::algorithm ( ) const
inline

Algorithm used for hashing the PDB content.

◆ algorithm() [2/2]

void LIEF::PE::PDBChecksum::algorithm ( HASH_ALGO algo)
inline

◆ classof()

static bool LIEF::PE::PDBChecksum::classof ( const Debug * debug)
inlinestatic

◆ clone()

std::unique_ptr< Debug > LIEF::PE::PDBChecksum::clone ( ) const
inlineoverridevirtual

Reimplemented from LIEF::PE::Debug.

◆ hash() [1/3]

span< uint8_t > LIEF::PE::PDBChecksum::hash ( )
inline

◆ hash() [2/3]

span< const uint8_t > LIEF::PE::PDBChecksum::hash ( ) const
inline

Hash of the PDB content.

◆ hash() [3/3]

void LIEF::PE::PDBChecksum::hash ( std::vector< uint8_t > h)
inline

◆ operator=() [1/2]

PDBChecksum & LIEF::PE::PDBChecksum::operator= ( const PDBChecksum & other)
default

◆ operator=() [2/2]

PDBChecksum & LIEF::PE::PDBChecksum::operator= ( PDBChecksum && other)
default

◆ parse()

static std::unique_ptr< PDBChecksum > LIEF::PE::PDBChecksum::parse ( const details::pe_debug & hdr,
Section * section,
span< uint8_t > payload )
static

◆ to_string()

std::string LIEF::PE::PDBChecksum::to_string ( ) const
overridevirtual

Reimplemented from LIEF::PE::Debug.


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