Inherits from NSObject
Declared in PGPKey.h

Tasks

Properties

directSignatures

@property (strong, nonatomic) NSMutableArray *directSignatures

isEncrypted

@property (assign, readonly) BOOL isEncrypted

keyID

@property (nonatomic, readonly) PGPKeyID *keyID

primaryKeyPacket

@property (strong, nonatomic) PGPPacket *primaryKeyPacket

revocationSignature

@property (strong, nonatomic) PGPPacket *revocationSignature

subKeys

@property (strong, nonatomic) NSMutableArray *subKeys

type

@property (assign, readonly) PGPKeyType type

users

@property (strong, nonatomic) NSMutableArray *users

Instance Methods

allKeyPackets

- (NSArray *)allKeyPackets

decrypt:error:

- (BOOL)decrypt:(NSString *)passphrase error:(NSError *__autoreleasing *)error
Discussion

Decrypts all secret key and subkey packets Note: After decryption encrypted packets are replaced with new decrypted instances on key. Warning: It is not good idea to keep decrypted key around

Parameters

passphrase

Password

error

error

Return Value

YES on success.

Declared In

PGPKey.h

decryptionKeyPacket

- (PGPSecretKeyPacket *)decryptionKeyPacket

encryptionKeyPacket

- (PGPPacket *)encryptionKeyPacket

export:

- (NSData *)export:(NSError *__autoreleasing *)error
Discussion

Export to transferable key packets sequence

Return Value

Data

Declared In

PGPKey.h

initWithPackets:

- (instancetype)initWithPackets:(NSArray *)packets

preferredSymmetricAlgorithm

- (PGPSymmetricAlgorithm)preferredSymmetricAlgorithm

signingKeyPacket

- (PGPPacket *)signingKeyPacket
Discussion

Signing key packet

Return Value

PGPSecureKeyPacket that can be used to signing

Declared In

PGPKey.h