Inherits from PGPPacket : NSObject
Conforms to NSCopying
Declared in PGPSignaturePacket.h

Tasks

Properties

canBeUsedToEncrypt

@property (nonatomic, readonly) BOOL canBeUsedToEncrypt

canBeUsedToSign

@property (nonatomic, readonly) BOOL canBeUsedToSign

creationDate

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

expirationDate

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

expired

@property (nonatomic, readonly, readonly, getter=isExpired) BOOL expired

hashAlgoritm

@property (nonatomic) PGPHashAlgorithm hashAlgoritm

hashedSubpackets

@property (nonatomic, copy, readonly) NSArray<PGPSignatureSubpacket*> *hashedSubpackets

issuerKeyID

@property (nonatomic, nullable, readonly) PGPKeyID *issuerKeyID

primaryUserID

@property (nonatomic, readonly, readonly, getter=isPrimaryUserID) BOOL primaryUserID

publicKeyAlgorithm

@property (nonatomic) PGPPublicKeyAlgorithm publicKeyAlgorithm

signatureMPIArray

@property (nonatomic, copy) NSArray<PGPMPI*> *signatureMPIArray

signedHashValueData

@property (nonatomic, nullable) NSData *signedHashValueData
Discussion

Two-octet field holding the left 16 bits of the signed hash value. Read from the key or set byt the call to [PGPSignaturePacket signData:usingKey:passphrase:userID:error]

Declared In

PGPSignaturePacket.h

subpackets

@property (nonatomic, copy, readonly) NSArray<PGPSignatureSubpacket*> *subpackets

type

@property (nonatomic) PGPSignatureType type

unhashedSubpackets

@property (nonatomic, copy, readonly) NSArray<PGPSignatureSubpacket*> *unhashedSubpackets

version

@property (nonatomic) UInt8 version

Class Methods

signaturePacket:hashAlgorithm:

+ (PGPSignaturePacket *)signaturePacket:(PGPSignatureType)type hashAlgorithm:(PGPHashAlgorithm)hashAlgorithm
Discussion

Create signature packet for signing. This is convienience constructor.

Parameters

type

example: PGPSignatureBinaryDocument

hashAlgorithm

hash algorithm to be used for signature

Return Value

Packet instance ready to call signData:secretKey

Declared In

PGPSignaturePacket.h

Instance Methods

calculateSignedHashForDataToSign:

- (NSData *)calculateSignedHashForDataToSign:(NSData *)dataToSign

signData:withKey:subKey:passphrase:userID:error:

- (BOOL)signData:(nullable NSData *)inputData withKey:(PGPKey *)key subKey:(nullable PGPKey *)subKey passphrase:(nullable NSString *)passphrase userID:(nullable NSString *)userID error:(NSError *__autoreleasing *)error
Discussion

Build signature data (signature packet with subpackets).

Parameters

inputData

Data to sign.

error

error

withKey

A key used to create signature.

Return Value

YES on success.

Declared In

PGPSignaturePacket.h

subpacketsOfType:

- (NSArray<PGPSignatureSubpacket*> *)subpacketsOfType:(PGPSignatureSubpacketType)type

verifyData:withKey:error:

- (BOOL)verifyData:(NSData *)inputData withKey:(PGPKey *)publicKey error:(NSError *__autoreleasing *)error

verifyData:withKey:signingKeyPacket:userID:error:

- (BOOL)verifyData:(NSData *)inputData withKey:(PGPKey *)publicKey signingKeyPacket:(PGPPublicKeyPacket *)signingKeyPacket userID:(nullable NSString *)userID error:(NSError *__autoreleasing *)error

verifyData:withKey:userID:error:

- (BOOL)verifyData:(NSData *)inputData withKey:(PGPKey *)publicKey userID:(nullable NSString *)userID error:(NSError *__autoreleasing *)error