<!--
{
  "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/TKTokenSessionDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "CryptoTokenKit"
    ],
    "preciseIdentifier" : "c:objc(pl)TKTokenSessionDelegate"
  },
  "title" : "TKTokenSessionDelegate"
}
-->

# TKTokenSessionDelegate

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

```
protocol TKTokenSessionDelegate : NSObjectProtocol
```

## Topics

### Determining Support for Operations

[`-  tokenSession:supportsOperation:usingKey:algorithm:`](/documentation/CryptoTokenKit/TKTokenSessionDelegate/tokenSession(_:supports:keyObjectID:algorithm:))

Asks the delegate whether the token session supports a given operation using the specified key and algorithm.

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

Operations that can be performed with a token’s keys and certificates.

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

A unique and persistent identifier of a particular token object.

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

Cryptographic algorithms used by token keys.

### Authenticating

[`-  tokenSession:beginAuthForOperation:constraint:error:`](/documentation/CryptoTokenKit/TKTokenSessionDelegate/tokenSession(_:beginAuthFor:constraint:))

Tells the delegate that authentication has begun for the specified operation and constraint.

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

A token’s authentication constraint for a specific operation.

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

An authentication operation for a cryptographic token.

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

A password-based authentication operation.

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

A Smart Card PIN authentication operation.

### Performing Cryptographic Operations

[`-  tokenSession:signData:usingKey:algorithm:error:`](/documentation/CryptoTokenKit/TKTokenSessionDelegate/tokenSession(_:sign:keyObjectID:algorithm:))

Tells the delegate to sign a data object using the specified key and algorithm.

[`-  tokenSession:decryptData:usingKey:algorithm:error:`](/documentation/CryptoTokenKit/TKTokenSessionDelegate/tokenSession(_:decrypt:keyObjectID:algorithm:))

Tells the delegate to decrypt a data object using the specified key and algorithm.

[`-  tokenSession:performKeyExchangeWithPublicKey:usingKey:algorithm:parameters:error:`](/documentation/CryptoTokenKit/TKTokenSessionDelegate/tokenSession(_:performKeyExchange:keyObjectID:algorithm:parameters:))

Tells the delegate to perform a key exchange using the specified key and algorithm.

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

Parameters used to perform specific key exchange operations.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)