Contents

sign(_:using:completion:)

Signs an opaque value using a cryptographic signature.

Declaration

func sign(_ signData: Data, using secureElementPass: PKSecureElementPass, completion: @escaping  @Sendable (Data?, Data?, (any Error)?) -> Void)
func sign(_ signData: Data, using secureElementPass: PKSecureElementPass) async throws -> (Data, Data)

Parameters

  • signData:

    The opaque value to sign.

  • secureElementPass:

    The Secure Element pass that PassKit uses to generate the signature.

  • completion:

    A Swift closure or an Objective-C block that PassKit runs when the process finishes.

    signedData

    The signed value.

    signature

    The cryptographic signature that PassKit uses to sign the value.

    error

    If the process fails, an error that describes the failure; otherwise, nil.

Discussion

PassKit may execute the completion Swift closure or an Objective-C block on an arbitrary queue.