LIEF: Library to Instrument Executable Formats Version 0.17.0
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
16#ifndef LIEF_PE_PDBCHECKSUM_H
17#define LIEF_PE_PDBCHECKSUM_H
30 static std::unique_ptr<PDBChecksum>
31 parse(
const details::pe_debug& hdr, Section* section, span<uint8_t> payload);
33 enum class HASH_ALGO : uint32_t {
39 Debug(Debug::TYPES::PDBCHECKSUM),
41 hash_(std::move(
hash))
45 HASH_ALGO algo, std::vector<uint8_t> hash) :
48 hash_(std::move(
hash))
52 PDBChecksum&
operator=(
const PDBChecksum& other) =
default;
55 PDBChecksum&
operator=(PDBChecksum&& other) =
default;
57 std::unique_ptr<Debug>
clone()
const override {
58 return std::unique_ptr<Debug>(
new PDBChecksum(*
this));
60 span<const uint8_t>
hash()
const {
70 void hash(std::vector<uint8_t> h) {
84 return debug->type() == Debug::TYPES::PDBCHECKSUM;
92 HASH_ALGO algo_ = HASH_ALGO::UNKNOWN;
93 std::vector<uint8_t> hash_;
This class represents a generic entry in the debug data directory. For known types,...
Definition debug/Debug.hpp:40
This class represents the PDB Checksum debug entry which is essentially an array of bytes representin...
Definition PDBChecksum.hpp:28
PDBChecksum(HASH_ALGO algo, std::vector< uint8_t > hash)
Definition PDBChecksum.hpp:38
PDBChecksum & operator=(const PDBChecksum &other)=default
PDBChecksum & operator=(PDBChecksum &&other)=default
HASH_ALGO algorithm() const
Algorithm used for hashing the PDB content.
Definition PDBChecksum.hpp:75
std::unique_ptr< Debug > clone() const override
Definition PDBChecksum.hpp:57
std::string to_string() const override
void algorithm(HASH_ALGO algo)
Definition PDBChecksum.hpp:79
span< uint8_t > hash()
Definition PDBChecksum.hpp:66
PDBChecksum(PDBChecksum &&)=default
PDBChecksum(const details::pe_debug &dbg, Section *sec, HASH_ALGO algo, std::vector< uint8_t > hash)
Definition PDBChecksum.hpp:44
span< const uint8_t > hash() const
Hash of the PDB content.
Definition PDBChecksum.hpp:62
~PDBChecksum() override=default
static bool classof(const Debug *debug)
Definition PDBChecksum.hpp:83
void hash(std::vector< uint8_t > h)
Definition PDBChecksum.hpp:70
HASH_ALGO
Definition PDBChecksum.hpp:33
PDBChecksum(const PDBChecksum &other)=default
static std::unique_ptr< PDBChecksum > parse(const details::pe_debug &hdr, Section *section, span< uint8_t > payload)
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
const char * to_string(AuxiliaryWeakExternal::CHARACTERISTICS e)
LIEF namespace.
Definition Abstract/Binary.hpp:36
Hash::value_type hash(const Object &v)
#define LIEF_API
Definition visibility.h:41