Generates a digital signature for a block of data.
- iOS 2.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Private key with which to sign the data.
The data to be signed. Typically, a digest of the actual data is signed.
Length in bytes of the data in the
databuffer. When PKCS1 padding is performed, the maximum length of data that can be signed is 11 bytes less than the value returned by the
Key Get Block Size
Key Get Block Size() - 11
On return, the digital signature.
On entry, the size of the buffer provided in the
sigparameter. On return, the amount of data actually placed in the buffer.
A result code. See Security Framework Result Codes.
The behavior this function with
k is undefined if the first byte of the data to sign is
0; there is no way to verify leading zeroes, as they are discarded during the calculation.