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

# canDecrypt(using:)

Checks whether the algorithm you supply is valid for decrypting data with the key.

## Declaration

```swift
func canDecrypt(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 decrypting data with the key.

## See Also

### Checking algorithm support

- [canExchangeKeys(using:)](localauthentication/laprivatekey/canexchangekeys(using:).md)
- [canSign(using:)](localauthentication/laprivatekey/cansign(using:).md)
