Inherits from NSObject
Conforms to NSCopying
PGPExportable
Declared in PGPPartialKey.h

Overview

Single Private or Public key.

Properties

directSignatures

@property (nonatomic, nullable, copy, readonly) NSArray<PGPSignaturePacket*> *directSignatures

expirationDate

@property (nonatomic, nullable, readonly) NSDate *expirationDate

fingerprint

@property (nonatomic, readonly) PGPFingerprint *fingerprint

isEncryptedWithPassword

@property (nonatomic, readonly) BOOL isEncryptedWithPassword

keyID

@property (nonatomic, readonly) PGPKeyID *keyID

primaryKeyPacket

@property (nonatomic, copy) PGPPacket *primaryKeyPacket

revocationSignature

@property (nonatomic, nullable, copy, readonly) PGPSignaturePacket *revocationSignature

signingKeyPacket

@property (nonatomic, nullable, readonly) PGPPacket *signingKeyPacket
Discussion

Signing key packet

Return Value

PGPSecureKeyPacket that can be used to signing

Declared In

PGPPartialKey.h

subKeys

@property (nonatomic, copy) NSArray<PGPPartialSubKey*> *subKeys

type

@property (nonatomic, readonly) PGPPartialKeyType type

users

@property (nonatomic, copy) NSArray<PGPUser*> *users

Class Methods

preferredSymmetricAlgorithmForKeys:

+ (PGPSymmetricAlgorithm)preferredSymmetricAlgorithmForKeys:(NSArray<PGPPartialKey*> *)keys

Instance Methods

allKeyPackets

- (NSArray<PGPPacket*> *)allKeyPackets

copyWithZone:

- (instancetype)copyWithZone:(nullable NSZone *)zone

decryptedWithPassphrase:error:

- (nullable PGPPartialKey *)decryptedWithPassphrase:(NSString *)passphrase error:(NSError *__autoreleasing *)error
Discussion

Decrypts all secret key and subkey packets Warning: It is not good idea to keep decrypted key around

Parameters

passphrase

Passphrase

error

error

Return Value

Decrypted key, or nil.

Declared In

PGPPartialKey.h

decryptionPacketForKeyID:error:

- (nullable PGPSecretKeyPacket *)decryptionPacketForKeyID:(PGPKeyID *)keyID error:(NSError *__autoreleasing *)error

encryptionKeyPacket:

- (nullable PGPPacket *)encryptionKeyPacket:(NSError *__autoreleasing *)error

initWithPackets:

- (instancetype)initWithPackets:(NSArray<PGPPacket*> *)packets

preferredSymmetricAlgorithm

- (PGPSymmetricAlgorithm)preferredSymmetricAlgorithm

signingKeyPacketWithKeyID:

- (nullable PGPPacket *)signingKeyPacketWithKeyID:(PGPKeyID *)keyID