mirror of
https://github.com/VibeDarling/class-dump.git
synced 2026-11-15 09:48:10 -10:00
65 lines
1.3 KiB
Objective-C
65 lines
1.3 KiB
Objective-C
// -*- mode: ObjC -*-
|
|
|
|
// This file is part of class-dump, a utility for examining the Objective-C segment of Mach-O files.
|
|
// Copyright (C) 1997-2019 Steve Nygard.
|
|
|
|
#import "CDLCEncryptionInfo.h"
|
|
|
|
// This is used on iOS.
|
|
|
|
@implementation CDLCEncryptionInfo
|
|
{
|
|
struct encryption_info_command_64 _encryptionInfoCommand;
|
|
}
|
|
|
|
- (id)initWithDataCursor:(CDMachOFileDataCursor *)cursor;
|
|
{
|
|
if ((self = [super initWithDataCursor:cursor])) {
|
|
_encryptionInfoCommand.cmd = [cursor readInt32];
|
|
_encryptionInfoCommand.cmdsize = [cursor readInt32];
|
|
|
|
_encryptionInfoCommand.cryptoff = [cursor readInt32];
|
|
_encryptionInfoCommand.cryptsize = [cursor readInt32];
|
|
_encryptionInfoCommand.cryptid = [cursor readInt32];
|
|
if (_encryptionInfoCommand.cmd == LC_ENCRYPTION_INFO_64) {
|
|
_encryptionInfoCommand.pad = [cursor readInt32];
|
|
}
|
|
}
|
|
|
|
return self;
|
|
}
|
|
|
|
#pragma mark -
|
|
|
|
- (uint32_t)cmd;
|
|
{
|
|
return _encryptionInfoCommand.cmd;
|
|
}
|
|
|
|
- (uint32_t)cmdsize;
|
|
{
|
|
return _encryptionInfoCommand.cmdsize;
|
|
}
|
|
|
|
- (uint32_t)cryptoff;
|
|
{
|
|
return _encryptionInfoCommand.cryptoff;
|
|
}
|
|
|
|
- (uint32_t)cryptsize;
|
|
{
|
|
return _encryptionInfoCommand.cryptsize;
|
|
}
|
|
|
|
- (uint32_t)cryptid;
|
|
{
|
|
return _encryptionInfoCommand.cryptid;
|
|
}
|
|
|
|
- (BOOL)isEncrypted;
|
|
{
|
|
return _encryptionInfoCommand.cryptid != 0;
|
|
}
|
|
|
|
@end
|