<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/kSecAttrTokenIDSecureEnclave",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@kSecAttrTokenIDSecureEnclave"
  },
  "title" : "kSecAttrTokenIDSecureEnclave"
}
-->

# kSecAttrTokenIDSecureEnclave

Specifies an item should be protected by the device’s Secure Enclave.

```
let kSecAttrTokenIDSecureEnclave: CFString
```

## Discussion

To generate a new key that’s protected by the Secure Enclave, call [`SecKeyGeneratePair(_:_:_:)`](/documentation/Security/SecKeyGeneratePair(_:_:_:)), setting the [`kSecAttrTokenID`](/documentation/Security/kSecAttrTokenID) key in the parameters dictionary to [`kSecAttrTokenIDSecureEnclave`](/documentation/Security/kSecAttrTokenIDSecureEnclave). For an example, see [Protecting keys with the Secure Enclave](/documentation/Security/protecting-keys-with-the-secure-enclave).

---

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)