16#ifndef LIEF_MACHO_CODE_SIGNATURE_COMMAND_H
17#define LIEF_MACHO_CODE_SIGNATURE_COMMAND_H
34struct linkedit_data_command;
49 std::unique_ptr<LoadCommand>
clone()
const override {
50 return std::unique_ptr<CodeSignature>(
new CodeSignature(*
this));
64 data_offset_ = offset;
82 std::ostream&
print(std::ostream& os)
const override;
85 return cmd->
command() == LoadCommand::TYPE::CODE_SIGNATURE;
89 uint32_t data_offset_ = 0;
90 uint32_t data_size_ = 0;
Class used to parse a single binary (i.e. non-FAT)
Definition BinaryParser.hpp:74
Class used to rebuild a Mach-O file.
Definition MachO/Builder.hpp:55
Definition CodeSignature.hpp:37
void data_size(uint32_t size)
Definition CodeSignature.hpp:66
static bool classof(const LoadCommand *cmd)
Definition CodeSignature.hpp:84
uint32_t data_size() const
Size of the raw signature.
Definition CodeSignature.hpp:59
uint32_t data_offset() const
Offset in the binary where the signature starts.
Definition CodeSignature.hpp:54
CodeSignature & operator=(const CodeSignature ©)=default
span< uint8_t > content()
Definition CodeSignature.hpp:70
CodeSignature(const details::linkedit_data_command &cmd)
std::ostream & print(std::ostream &os) const override
std::unique_ptr< LoadCommand > clone() const override
Definition CodeSignature.hpp:49
void accept(Visitor &visitor) const override
~CodeSignature() override=default
void data_offset(uint32_t offset)
Definition CodeSignature.hpp:63
span< const uint8_t > content() const
Definition CodeSignature.hpp:74
CodeSignature(const CodeSignature ©)=default
Definition LinkEdit.hpp:42
Based class for the Mach-O load commands.
Definition LoadCommand.hpp:36
LoadCommand::TYPE command() const
Command type.
Definition LoadCommand.hpp:122
Definition Visitor.hpp:224
LIEF namespace.
Definition Abstract/Binary.hpp:32
tcb::span< ElementType, Extent > span
Definition span.hpp:22
#define LIEF_API
Definition visibility.h:41