<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/SecKeyIsAlgorithmSupported(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@F@SecKeyIsAlgorithmSupported"
  },
  "title" : "SecKeyIsAlgorithmSupported(_:_:_:)"
}
-->

# SecKeyIsAlgorithmSupported(_:_:_:)

Returns a Boolean indicating whether a key is suitable for an operation using a certain algorithm.

```
func SecKeyIsAlgorithmSupported(_ key: SecKey, _ operation: SecKeyOperationType, _ algorithm: SecKeyAlgorithm) -> Bool
```

## Parameters

`key`

The key whose suitability you want to test.

`operation`

The operation that you want to perform with the key. Use one of the values from [`SecKeyOperationType`](/documentation/Security/SecKeyOperationType).

`algorithm`

The algorithm that you want to perform with the key. Use one of the values from [`SecKeyAlgorithm`](/documentation/Security/SecKeyAlgorithm).

## Return Value

A Boolean indicating whether the key can be used for the given operation and algorithm.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)