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



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

field :cryptid, :uint32

#cryptoffInteger

Returns the offset to the encrypted segment.

Returns:

  • (Integer)

    the offset to the encrypted segment



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

field :cryptoff, :uint32

#cryptsizeInteger

Returns the size of the encrypted segment.

Returns:

  • (Integer)

    the size of the encrypted segment



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

field :cryptsize, :uint32

#to_hHash

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

Returns:



1090
1091
1092
1093
1094
1095
1096
# File 'lib/macho/load_commands.rb', line 1090

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