signature(for:)
Generates an elliptic curve digital signature algorithm (ECDSA) signature of the given data over the P-256 elliptic curve, using SHA-256 as the hash function.
Declaration
func signature<D>(for data: D) throws -> P256.Signing.ECDSASignature where D : DataProtocolParameters
- data:
The data to sign.
Return Value
A cryptographic signature. The signing algorithm employs randomization to generate a different signature on every call, even for the same data and key.