signature(for:)

Generates an Elliptic Curve Digital Signature Algorithm (ECDSA) signature of the data you provide over the P-384 elliptic curve, using SHA-384 as the hash function.

ECDSA.swift:338
iOS
13+
macOS
10.15+
tvOS
13+
watchOS
6+
func signature<D>(for data: D) throws -> P384.Signing.ECDSASignature where D : DataProtocol

Parameters

data

The data to sign.

Returns

The signature corresponding to the data. The signing algorithm employs randomization to generate a different signature on every call, even for the same data and key.