<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 4.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CryptoTokenKit",
  "identifier" : "/documentation/CryptoTokenKit/TKToken",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "CryptoTokenKit"
    ],
    "preciseIdentifier" : "c:objc(cs)TKToken"
  },
  "title" : "TKToken"
}
-->

# TKToken

A representation of a hardware-based cryptographic token.

```
class TKToken
```

## Overview> Note:
> When working with smart card tokens, use or inherit from the ``doc://com.apple.cryptotokenkit/documentation/CryptoTokenKit/TKSmartCardToken`` subclass instead.

## Topics

### Creating Tokens

[`init(tokenDriver:instanceID:)`](/documentation/CryptoTokenKit/TKToken/init(tokenDriver:instanceID:))

Initializes a token with the driver you specify.

[`TKToken.InstanceID`](/documentation/CryptoTokenKit/TKToken/InstanceID)

A type that represents the instance identifier of a token.

### Responding to Session Creation

[`delegate`](/documentation/CryptoTokenKit/TKToken/delegate)

The token delegate.

[`TKTokenDelegate`](/documentation/CryptoTokenKit/TKTokenDelegate)

The interface that a token delegate implements to respond to session creation events.

### Accessing the Driver

[`tokenDriver`](/documentation/CryptoTokenKit/TKToken/tokenDriver)

The token driver.

### Accessing Keychain Items

[`keychainContents`](/documentation/CryptoTokenKit/TKToken/keychainContents)

The contents of the keychain for this token.

[`TKTokenKeychainContents`](/documentation/CryptoTokenKit/TKTokenKeychainContents)

A representation of the state of the keychain for a particular token.

[`TKTokenKeychainItem`](/documentation/CryptoTokenKit/TKTokenKeychainItem)

An abstract base class for managing a token’s contents as keychain items.

[`TKTokenKeychainCertificate`](/documentation/CryptoTokenKit/TKTokenKeychainCertificate)

A token’s certificate as stored in the keychain.

[`TKTokenKeychainKey`](/documentation/CryptoTokenKit/TKTokenKeychainKey)

A token’s key as stored in the keychain.

[`TKToken.ObjectID`](/documentation/CryptoTokenKit/TKToken/ObjectID)

A unique and persistent identifier of a particular token object.

[`TKToken.ObjectID`](/documentation/CryptoTokenKit/TKToken/ObjectID)

A unique and persistent identifier of a particular token object.

### Configuring the Token

[`configuration`](/documentation/CryptoTokenKit/TKToken/configuration-swift.property)

The current configuration for a token.

[`TKToken.Configuration`](/documentation/CryptoTokenKit/TKToken/Configuration-swift.class)

A token’s configuration.



---

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)