Contents

decrypt(_:algorithm:completion:)

Decrypts the data you supply with a given algorithm.

Declaration

func decrypt(_ data: Data, algorithm: SecKeyAlgorithm, completion handler: @escaping  @Sendable (Data?, (any Error)?) -> Void)
func decrypt(_ data: Data, algorithm: SecKeyAlgorithm) async throws -> Data

Parameters

  • data:

    The data to decrypt.

  • algorithm:

    The algorithm to use to decrypt the data.

  • handler:

    A completion handler to call when the decryption operation completes.

    data

    The decrypted data.

    error

    An error object that indicates why the decryption failed, or nil if it succeeded.

Discussion

See Also

Performing cryptographic operations