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

# canSign(using:)

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

## Declaration

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

## See Also

### Checking algorithm support

- [canDecrypt(using:)](localauthentication/laprivatekey/candecrypt(using:).md)
- [canExchangeKeys(using:)](localauthentication/laprivatekey/canexchangekeys(using:).md)
