signature(for:)
Generates an EdDSA signature over Curve25519.
Declaration
func signature<D>(for data: D) throws -> Data where D : DataProtocolParameters
- data:
The data to sign.
Return Value
The signature for the data. Although not required by RFC 8032, which describes the Edwards-Curve Digital Signature Algorithm (EdDSA), the CryptoKit implementation of the algorithm employs randomization to generate a different signature on every call, even for the same data and key, to guard against side-channel attacks.