PSPDFPKCS12Signer


@interface PSPDFPKCS12Signer : PSPDFSigner

Concrete implementation of a PSPDFSigner where filter is Adobe.PPKLite and subFilter is adbe.pkcs7.detached.

  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFPKCS12Signer : PSPDFSigner
  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFPKCS12Signer : PSPDFSigner
  • Creates a new PKCS12 signer with the specified display name. The certificate and private key should be contained in p12.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDisplayName:(nonnull NSString *)displayName
                                         PKCS12:(nonnull PSPDFPKCS12 *)p12;

    Swift

    init(displayName: String, pkcs12 p12: PSPDFPKCS12)
  • The signer display name. This name is shown on the signature UI.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull displayName;

    Swift

    var displayName: String { get }
  • p12

    The PKCS12 container holding the private key and certificate.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFPKCS12 *_Nonnull p12;

    Swift

    var p12: PSPDFPKCS12 { get }
  • Private key from the certificate used to produce the signature by encrypting the message digest from the PDF file. (see details https://pspdfkit.com/guides/ios/current/features/digital-signatures/ )

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic, nullable) PSPDFPrivateKey *privateKey;

    Swift

    var privateKey: PSPDFPrivateKey? { get set }
  • Signs the element using provided password to open the p12 container (to get the certificate and the private key). Use it only for non-interactive signing process.

    Declaration

    Objective-C

    - (void)signFormElement:(nonnull PSPDFSignatureFormElement *)element
              usingPassword:(nonnull NSString *)password
                    writeTo:(nonnull NSString *)path
                 completion:(nullable void (^)(BOOL, PSPDFDocument *_Nonnull,
                                               NSError *_Nullable))completionBlock;

    Swift

    func sign(_ element: PSPDFSignatureFormElement, usingPassword password: String, writeTo path: String, completion completionBlock: ((Bool, PSPDFDocument, Error?) -> Void)? = nil)