Instance Method

tokenSession(_:performKeyExchange:keyObjectID:algorithm:parameters:)

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

Declaration

optional func tokenSession(_ session: TKTokenSession, performKeyExchange otherPartyPublicKeyData: Data, keyObjectID objectID: TKToken.ObjectID, algorithm: TKTokenKeyAlgorithm, parameters: TKTokenKeyExchangeParameters) throws -> Data

Parameters

session

The token session.

otherPartyPublicKeyData

The public key of the other party.

keyObjectID

The identifier of the private key object.

algorithm

The algorithm to be used for key exchange.

parameters

Additional parameters used by algorithm to perform the key exchange.

error

If an error occurred, this method should return nil and populate this parameter with an object containing details of the error. The error object should have a domain equal to TKErrorDomain and a code equal to a value defined by the TKError.Code enumeration.

Return Value

The result of the key exchange, or nil if an error occurred.

See Also

Performing Cryptographic Operations

func tokenSession(TKTokenSession, sign: Data, keyObjectID: TKToken.ObjectID, algorithm: TKTokenKeyAlgorithm) -> Data

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

func tokenSession(TKTokenSession, decrypt: Data, keyObjectID: TKToken.ObjectID, algorithm: TKTokenKeyAlgorithm) -> Data

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

class TKTokenKeyExchangeParameters

Parameters used to perform specific key exchange operations.