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 -> DataParameters
- 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.
dataThe decrypted data.
errorAn error object that indicates why the decryption failed, or
nilif it succeeded.