---
title: "SecKeyRawVerify(_:_:_:_:_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/seckeyrawverify(_:_:_:_:_:_:)"
---

# SecKeyRawVerify(_:_:_:_:_:_:)

Verifies a digital signature.

## Declaration

```swift
func SecKeyRawVerify(_ key: SecKey, _ padding: SecPadding, _ signedData: UnsafePointer<UInt8>, _ signedDataLen: Int, _ sig: UnsafePointer<UInt8>, _ sigLen: Int) -> OSStatus
```

## Parameters

- `key`: Public key with which to verify the data.
- `padding`: The type of padding used. Possible values are listed in doc://com.apple.security/documentation/Security/SecPadding. Use doc://com.apple.security/documentation/Security/SecPadding/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 doc://com.apple.security/documentation/Security/SecPadding/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 signedData buffer.
- `sig`: The digital signature to be verified.
- `sigLen`: Length of the data in the sig buffer.

## Return Value

Return Value A result code. See Security Framework Result Codes.
