---
title: "canExchangeKeys(using:)"
framework: localauthentication
role: symbol
role_heading: Instance Method
path: "localauthentication/laprivatekey/canexchangekeys(using:)"
---

# canExchangeKeys(using:)

Checks whether the algorithm you supply is valid for performing key exchanges.

## Declaration

```swift
func canExchangeKeys(using algorithm: SecKeyAlgorithm) -> Bool
```

## Parameters

- `algorithm`: A cryptographic algorithm.

## Return Value

Return Value A Boolean value that indicates whether the algorithm you supply is valid for performing key exchanges.

## See Also

### Checking algorithm support

- [canDecrypt(using:)](localauthentication/laprivatekey/candecrypt(using:).md)
- [canSign(using:)](localauthentication/laprivatekey/cansign(using:).md)
