SecKeyRawVerify(_:_:_:_:_:_:)
Verifies a digital signature.
Declaration
func SecKeyRawVerify(_ key: SecKey, _ padding: SecPadding, _ signedData: UnsafePointer<UInt8>, _ signedDataLen: Int, _ sig: UnsafePointer<UInt8>, _ sigLen: Int) -> OSStatusParameters
- key:
Public key with which to verify the data.
- padding:
The type of padding used. Possible values are listed in Secpadding. Use Pkcs1sha1 if you are verifying a PKCS1-style signature with DER encoding of the digest type and the signed data is a SHA1 digest of the actual data. Specify Ksecpaddingnone if no padding was used.
- signedData:
The data for which the signature is being verified. Typically, a digest of the actual data is signed.
- signedDataLen:
Length in bytes of the data in the
signedDatabuffer. - sig:
The digital signature to be verified.
- sigLen:
Length of the data in the
sigbuffer.
Return Value
A result code. See Security Framework Result Codes.