<!--
{
  "availability" : [
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/SecItemImportExportKeyParameters/keyUsage",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@SA@SecItemImportExportKeyParameters@FI@keyUsage"
  },
  "title" : "keyUsage"
}
-->

# keyUsage

An array containing usage attributes applied to a key on import.

```
var keyUsage: Unmanaged<CFArray>?
```

## Discussion

The array may contain any of the following key usage constants:

- [`kSecAttrCanEncrypt`](/documentation/Security/kSecAttrCanEncrypt)
- [`kSecAttrCanDecrypt`](/documentation/Security/kSecAttrCanDecrypt)
- [`kSecAttrCanDerive`](/documentation/Security/kSecAttrCanDerive)
- [`kSecAttrCanSign`](/documentation/Security/kSecAttrCanSign)
- [`kSecAttrCanVerify`](/documentation/Security/kSecAttrCanVerify)
- [`kSecAttrCanWrap`](/documentation/Security/kSecAttrCanWrap)
- [`kSecAttrCanUnwrap`](/documentation/Security/kSecAttrCanUnwrap)

If the array is `NULL`, all operations are allowed by default.

---

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)