signature(for:)
Generates an RSA signature with the given key using the default padding.
- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
func signature<D>(for digest: D) throws -> _RSA.Signing.RSASignature where D : Digest
Parameters
- digest
The digest to sign.
Returns
The RSA Signature.
Throws
If there is a failure producing the signature
The default padding is PSS using MGF1 with same hash function as produced the digest being signed, and a salt that is as long as the digest. Note that this API will not select any known-insecure digests.