16#ifndef LIEF_PE_CONTENT_INFO_H
17#define LIEF_PE_CONTENT_INFO_H
89 type_(
std::move(oid)) {}
95 virtual std::unique_ptr<Content>
clone()
const = 0;
96 virtual void print(std::ostream& os)
const = 0;
106 static_assert(std::is_base_of<Content, T>::value,
107 "Require ContentInfo inheritance");
108 if (T::classof(
this)) {
109 return static_cast<const T*
>(
this);
116 return const_cast<T*
>(
static_cast<const Content*
>(
this)->cast<
T>());
134 return value_->content_type();
160 std::unique_ptr<Content> value_;
Definition ContentInfo.hpp:86
~Content() override=default
const oid_t & content_type() const
Definition ContentInfo.hpp:91
Content(oid_t oid)
Definition ContentInfo.hpp:88
virtual std::unique_ptr< Content > clone() const =0
virtual void print(std::ostream &os) const =0
T * cast()
Definition ContentInfo.hpp:115
const T * cast() const
Definition ContentInfo.hpp:105
friend std::ostream & operator<<(std::ostream &os, const Content &content)
Definition ContentInfo.hpp:98
std::vector< uint8_t > digest() const
Return the digest (authentihash) if the underlying content type is SPC_INDIRECT_DATA_OBJID Otherwise,...
ALGORITHMS digest_algorithm() const
Return the digest used to hash the file.
void accept(Visitor &visitor) const override
ContentInfo(ContentInfo &&other) noexcept=default
ContentInfo(const ContentInfo &other)
const Content & value() const
Definition ContentInfo.hpp:141
oid_t content_type() const
Return the OID that describes the content wrapped by this object. It should match SPC_INDIRECT_DATA_O...
Definition ContentInfo.hpp:133
~ContentInfo() override=default
friend class SignatureParser
Definition ContentInfo.hpp:83
Content & value()
Definition ContentInfo.hpp:137
friend class Parser
Definition ContentInfo.hpp:82
void swap(ContentInfo &other) noexcept
ContentInfo & operator=(ContentInfo other)
friend std::ostream & operator<<(std::ostream &os, const ContentInfo &content_info)
Main interface to parse PE binaries. In particular, the static Parser::parse functions should be used...
Definition PE/Parser.hpp:52
Definition SignatureParser.hpp:37
Definition Visitor.hpp:212
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
ALGORITHMS
Cryptography algorithms.
Definition PE/enums.hpp:28
std::string oid_t
Definition PE/signature/types.hpp:23
@ T
Definition AcceleratorCodes.hpp:97
LIEF namespace.
Definition Abstract/Binary.hpp:40
#define LIEF_API
Definition visibility.h:43