Class: MachO::LoadCommands::EncryptionInfoCommand

Inherits:
LoadCommand show all
Defined in:
lib/macho/load_commands.rb

Overview

A load command representing the offset to and size of an encrypted segment. Corresponds to LC_ENCRYPTION_INFO.

Direct Known Subclasses

EncryptionInfoCommand64

Instance Method Summary collapse

Methods inherited from LoadCommand

#cmd, #cmdsize, create, new_from_bin, #offset, #serializable?, #serialize, #to_s, #type, #view

Methods inherited from MachOStructure

bytesize, format, #initialize, new_from_bin

Constructor Details

This class inherits a constructor from MachO::MachOStructure

Instance Method Details

#cryptidInteger

Returns the encryption system, or 0 if not encrypted yet.

Returns:

  • (Integer)

    the encryption system, or 0 if not encrypted yet



988
# File 'lib/macho/load_commands.rb', line 988

field :cryptid, :uint32

#cryptoffInteger

Returns the offset to the encrypted segment.

Returns:

  • (Integer)

    the offset to the encrypted segment



982
# File 'lib/macho/load_commands.rb', line 982

field :cryptoff, :uint32

#cryptsizeInteger

Returns the size of the encrypted segment.

Returns:

  • (Integer)

    the size of the encrypted segment



985
# File 'lib/macho/load_commands.rb', line 985

field :cryptsize, :uint32

#to_hHash

Returns a hash representation of this MachO::LoadCommands::EncryptionInfoCommand.

Returns:



991
992
993
994
995
996
997
# File 'lib/macho/load_commands.rb', line 991

def to_h
  {
    "cryptoff" => cryptoff,
    "cryptsize" => cryptsize,
    "cryptid" => cryptid,
  }.merge super
end