Class: MachO::LoadCommands::EncryptionInfoCommand
- Inherits:
-
LoadCommand
- Object
- MachOStructure
- LoadCommand
- MachO::LoadCommands::EncryptionInfoCommand
- 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
Constant Summary collapse
- FORMAT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"L=5"
- SIZEOF =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
20
Instance Attribute Summary collapse
-
#cryptid ⇒ Integer
readonly
The encryption system, or 0 if not encrypted yet.
-
#cryptoff ⇒ Integer
readonly
The offset to the encrypted segment.
-
#cryptsize ⇒ Integer
readonly
The size of the encrypted segment.
Attributes inherited from LoadCommand
Instance Method Summary collapse
-
#initialize(view, cmd, cmdsize, cryptoff, cryptsize, cryptid) ⇒ EncryptionInfoCommand
constructor
private
A new instance of EncryptionInfoCommand.
-
#to_h ⇒ Hash
A hash representation of this EncryptionInfoCommand.
Methods inherited from LoadCommand
create, new_from_bin, #offset, #serializable?, #serialize, #to_s, #type
Methods inherited from MachOStructure
Constructor Details
#initialize(view, cmd, cmdsize, cryptoff, cryptsize, cryptid) ⇒ EncryptionInfoCommand
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of EncryptionInfoCommand.
1255 1256 1257 1258 1259 1260 |
# File 'lib/macho/load_commands.rb', line 1255 def initialize(view, cmd, cmdsize, cryptoff, cryptsize, cryptid) super(view, cmd, cmdsize) @cryptoff = cryptoff @cryptsize = cryptsize @cryptid = cryptid end |
Instance Attribute Details
#cryptid ⇒ Integer (readonly)
Returns the encryption system, or 0 if not encrypted yet.
1244 1245 1246 |
# File 'lib/macho/load_commands.rb', line 1244 def cryptid @cryptid end |
#cryptoff ⇒ Integer (readonly)
Returns the offset to the encrypted segment.
1238 1239 1240 |
# File 'lib/macho/load_commands.rb', line 1238 def cryptoff @cryptoff end |
#cryptsize ⇒ Integer (readonly)
Returns the size of the encrypted segment.
1241 1242 1243 |
# File 'lib/macho/load_commands.rb', line 1241 def cryptsize @cryptsize end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this MachO::LoadCommands::EncryptionInfoCommand.
1263 1264 1265 1266 1267 1268 1269 |
# File 'lib/macho/load_commands.rb', line 1263 def to_h { "cryptoff" => cryptoff, "cryptsize" => cryptsize, "cryptid" => cryptid, }.merge super end |