CryptoTokenKit Changes for Swift
CryptoTokenKit
Removed TKSmartCardProtocol.init(_: UInt)
Added TKErrorCode.BadParameter
Added TKSmartCardPINCompletion.init(rawValue: UInt)
Added TKSmartCardPINConfirmation.init(rawValue: UInt)
Added TKSmartCardPINFormat
Added TKSmartCardUserInteractionDelegate.characterEnteredInUserInteraction(_: TKSmartCardUserInteraction)
Added TKSmartCardUserInteractionDelegate.newPINRequestedInUserInteraction(_: TKSmartCardUserInteraction)
Modified TKErrorCode [enum]
Declaration | Raw Value Type | |
---|---|---|
From | enum TKErrorCode : Int { case CodeNotImplemented case CodeCommunicationError case CodeCorruptedData case CodeCanceledByUser case AuthenticationFailed case ObjectNotFound case TokenNotFound } | -- |
To | enum TKErrorCode : Int { case NotImplemented case CommunicationError case CorruptedData case CanceledByUser case AuthenticationFailed case ObjectNotFound case TokenNotFound case BadParameter static var TKErrorAuthenticationFailed: TKErrorCode { get } static var TKErrorObjectNotFound: TKErrorCode { get } static var TKErrorTokenNotFound: TKErrorCode { get } } | Int |
Modified TKErrorCode.CanceledByUser
Declaration | |
---|---|
From | case CodeCanceledByUser |
To | case CanceledByUser |
Modified TKErrorCode.CommunicationError
Declaration | |
---|---|
From | case CodeCommunicationError |
To | case CommunicationError |
Modified TKErrorCode.CorruptedData
Declaration | |
---|---|
From | case CodeCorruptedData |
To | case CorruptedData |
Modified TKErrorCode.NotImplemented
Declaration | |
---|---|
From | case CodeNotImplemented |
To | case NotImplemented |
Name | Declaration | Deprecation | |
---|---|---|---|
From | AuthenticationFailed | case AuthenticationFailed | -- |
To | TKErrorAuthenticationFailed | static var TKErrorAuthenticationFailed: TKErrorCode { get } | OS X 10.11 |
Modified TKErrorCode.TKErrorObjectNotFound
Name | Declaration | Deprecation | |
---|---|---|---|
From | ObjectNotFound | case ObjectNotFound | -- |
To | TKErrorObjectNotFound | static var TKErrorObjectNotFound: TKErrorCode { get } | OS X 10.11 |
Modified TKErrorCode.TKErrorTokenNotFound
Name | Declaration | Deprecation | |
---|---|---|---|
From | TokenNotFound | case TokenNotFound | -- |
To | TKErrorTokenNotFound | static var TKErrorTokenNotFound: TKErrorCode { get } | OS X 10.11 |
Modified TKSmartCard
Declaration | |
---|---|
From | class TKSmartCard : NSObject { var slot: TKSmartCardSlot! { get } var valid: Bool { get } var allowedProtocols: TKSmartCardProtocol var currentProtocol: TKSmartCardProtocol { get } var sensitive: Bool var context: AnyObject! func beginSessionWithReply(_ reply: ((Bool, NSError!) -> Void)!) func transmitRequest(_ request: NSData!, reply reply: ((NSData!, NSError!) -> Void)!) func endSession() } extension TKSmartCard { var cla: UInt8 var useExtendedLength: Bool func sendIns(_ ins: UInt8, p1 p1: UInt8, p2 p2: UInt8, data requestData: NSData!, le le: NSNumber!, reply reply: ((NSData!, UInt16, NSError!) -> Void)!) } |
To | class TKSmartCard : NSObject { var slot: TKSmartCardSlot { get } var valid: Bool { get } var allowedProtocols: TKSmartCardProtocol var currentProtocol: TKSmartCardProtocol { get } var sensitive: Bool var context: AnyObject? func beginSessionWithReply(_ reply: (Bool, NSError?) -> Void) func transmitRequest(_ request: NSData, reply reply: (NSData?, NSError?) -> Void) func endSession() func userInteractionForSecurePINVerificationWithPINFormat(_ PINFormat: TKSmartCardPINFormat, APDU APDU: NSData, PINByteOffset PINByteOffset: Int) -> TKSmartCardUserInteractionForSecurePINVerification? func userInteractionForSecurePINChangeWithPINFormat(_ PINFormat: TKSmartCardPINFormat, APDU APDU: NSData, currentPINByteOffset currentPINByteOffset: Int, newPINByteOffset newPINByteOffset: Int) -> TKSmartCardUserInteractionForSecurePINChange? } extension TKSmartCard { var cla: UInt8 var useExtendedLength: Bool func sendIns(_ ins: UInt8, p1 p1: UInt8, p2 p2: UInt8, data requestData: NSData, le le: NSNumber?, reply reply: (NSData?, UInt16, NSError?) -> Void) } |
Declaration | |
---|---|
From | func beginSessionWithReply(_ reply: ((Bool, NSError!) -> Void)!) |
To | func beginSessionWithReply(_ reply: (Bool, NSError?) -> Void) |
Modified TKSmartCard.context
Declaration | |
---|---|
From | var context: AnyObject! |
To | var context: AnyObject? |
Declaration | |
---|---|
From | func sendIns(_ ins: UInt8, p1 p1: UInt8, p2 p2: UInt8, data requestData: NSData!, le le: NSNumber!, reply reply: ((NSData!, UInt16, NSError!) -> Void)!) |
To | func sendIns(_ ins: UInt8, p1 p1: UInt8, p2 p2: UInt8, data requestData: NSData, le le: NSNumber?, reply reply: (NSData?, UInt16, NSError?) -> Void) |
Modified TKSmartCard.slot
Declaration | |
---|---|
From | var slot: TKSmartCardSlot! { get } |
To | var slot: TKSmartCardSlot { get } |
Declaration | |
---|---|
From | func transmitRequest(_ request: NSData!, reply reply: ((NSData!, NSError!) -> Void)!) |
To | func transmitRequest(_ request: NSData, reply reply: (NSData?, NSError?) -> Void) |
Modified TKSmartCardATR
Declaration | |
---|---|
From | class TKSmartCardATR : NSObject { init!(bytes bytes: NSData!) init!(source source: (() -> Int32)!) var bytes: NSData! { get } var protocols: [AnyObject]! { get } func interfaceGroupAtIndex(_ index: Int) -> TKSmartCardATRInterfaceGroup! func interfaceGroupForProtocol(_ `protocol`: TKSmartCardProtocol) -> TKSmartCardATRInterfaceGroup! var historicalBytes: NSData! { get } } |
To | class TKSmartCardATR : NSObject { init?(bytes bytes: NSData) init?(source source: () -> Int32) var bytes: NSData { get } var protocols: [NSNumber] { get } func interfaceGroupAtIndex(_ index: Int) -> TKSmartCardATRInterfaceGroup? func interfaceGroupForProtocol(_ `protocol`: TKSmartCardProtocol) -> TKSmartCardATRInterfaceGroup? var historicalBytes: NSData { get } } |
Modified TKSmartCardATR.bytes
Declaration | |
---|---|
From | var bytes: NSData! { get } |
To | var bytes: NSData { get } |
Modified TKSmartCardATR.historicalBytes
Declaration | |
---|---|
From | var historicalBytes: NSData! { get } |
To | var historicalBytes: NSData { get } |
Modified TKSmartCardATR.init(bytes: NSData)
Declaration | |
---|---|
From | init!(bytes bytes: NSData!) |
To | init?(bytes bytes: NSData) |
Declaration | |
---|---|
From | init!(source source: (() -> Int32)!) |
To | init?(source source: () -> Int32) |
Declaration | |
---|---|
From | func interfaceGroupAtIndex(_ index: Int) -> TKSmartCardATRInterfaceGroup! |
To | func interfaceGroupAtIndex(_ index: Int) -> TKSmartCardATRInterfaceGroup? |
Modified TKSmartCardATR.interfaceGroupForProtocol(_: TKSmartCardProtocol) -> TKSmartCardATRInterfaceGroup?
Declaration | |
---|---|
From | func interfaceGroupForProtocol(_ `protocol`: TKSmartCardProtocol) -> TKSmartCardATRInterfaceGroup! |
To | func interfaceGroupForProtocol(_ `protocol`: TKSmartCardProtocol) -> TKSmartCardATRInterfaceGroup? |
Modified TKSmartCardATR.protocols
Declaration | |
---|---|
From | var protocols: [AnyObject]! { get } |
To | var protocols: [NSNumber] { get } |
Modified TKSmartCardATRInterfaceGroup
Declaration | |
---|---|
From | class TKSmartCardATRInterfaceGroup : NSObject { var TA: NSNumber! { get } var TB: NSNumber! { get } var TC: NSNumber! { get } var `protocol`: NSNumber! { get } } |
To | class TKSmartCardATRInterfaceGroup : NSObject { var TA: NSNumber? { get } var TB: NSNumber? { get } var TC: NSNumber? { get } var `protocol`: NSNumber? { get } } |
Declaration | |
---|---|
From | var `protocol`: NSNumber! { get } |
To | var `protocol`: NSNumber? { get } |
Modified TKSmartCardATRInterfaceGroup.TA
Declaration | |
---|---|
From | var TA: NSNumber! { get } |
To | var TA: NSNumber? { get } |
Modified TKSmartCardATRInterfaceGroup.TB
Declaration | |
---|---|
From | var TB: NSNumber! { get } |
To | var TB: NSNumber? { get } |
Modified TKSmartCardATRInterfaceGroup.TC
Declaration | |
---|---|
From | var TC: NSNumber! { get } |
To | var TC: NSNumber? { get } |
Modified TKSmartCardProtocol [struct]
Declaration | Protocols | |
---|---|---|
From | struct TKSmartCardProtocol : RawOptionSetType { init(_ rawValue: UInt) init(rawValue rawValue: UInt) static var None: TKSmartCardProtocol { get } static var T0: TKSmartCardProtocol { get } static var T1: TKSmartCardProtocol { get } static var T15: TKSmartCardProtocol { get } static var Any: TKSmartCardProtocol { get } } | RawOptionSetType |
To | struct TKSmartCardProtocol : OptionSetType { init(rawValue rawValue: UInt) static var None: TKSmartCardProtocol { get } static var T0: TKSmartCardProtocol { get } static var T1: TKSmartCardProtocol { get } static var T15: TKSmartCardProtocol { get } static var Any: TKSmartCardProtocol { get } } | OptionSetType |
Modified TKSmartCardSlot
Declaration | |
---|---|
From | class TKSmartCardSlot : NSObject { var state: TKSmartCardSlotState { get } var ATR: TKSmartCardATR! { get } var name: String! { get } var maxInputLength: Int { get } var maxOutputLength: Int { get } func makeSmartCard() -> TKSmartCard! } |
To | class TKSmartCardSlot : NSObject { var state: TKSmartCardSlotState { get } var ATR: TKSmartCardATR? { get } var name: String { get } var maxInputLength: Int { get } var maxOutputLength: Int { get } func makeSmartCard() -> TKSmartCard? } |
Modified TKSmartCardSlot.ATR
Declaration | |
---|---|
From | var ATR: TKSmartCardATR! { get } |
To | var ATR: TKSmartCardATR? { get } |
Declaration | |
---|---|
From | func makeSmartCard() -> TKSmartCard! |
To | func makeSmartCard() -> TKSmartCard? |
Modified TKSmartCardSlot.name
Declaration | |
---|---|
From | var name: String! { get } |
To | var name: String { get } |
Modified TKSmartCardSlotManager
Declaration | |
---|---|
From | class TKSmartCardSlotManager : NSObject { class func defaultManager() -> Self! var slotNames: [AnyObject]! { get } func getSlotWithName(_ name: String!, reply reply: ((TKSmartCardSlot!) -> Void)!) } |
To | class TKSmartCardSlotManager : NSObject { class func defaultManager() -> Self? var slotNames: [String] { get } func getSlotWithName(_ name: String, reply reply: (TKSmartCardSlot?) -> Void) } |
Declaration | |
---|---|
From | class func defaultManager() -> Self! |
To | class func defaultManager() -> Self? |
Declaration | |
---|---|
From | func getSlotWithName(_ name: String!, reply reply: ((TKSmartCardSlot!) -> Void)!) |
To | func getSlotWithName(_ name: String, reply reply: (TKSmartCardSlot?) -> Void) |
Modified TKSmartCardSlotManager.slotNames
Declaration | |
---|---|
From | var slotNames: [AnyObject]! { get } |
To | var slotNames: [String] { get } |
Modified TKSmartCardSlotState [enum]
Declaration | Raw Value Type | |
---|---|---|
From | enum TKSmartCardSlotState : Int { case SlotStateMissing case SlotStateEmpty case SlotStateProbing case SlotStateMuteCard case SlotStateValidCard } | -- |
To | enum TKSmartCardSlotState : Int { case Missing case Empty case Probing case MuteCard case ValidCard } | Int |
Modified TKSmartCardSlotState.Empty
Declaration | |
---|---|
From | case SlotStateEmpty |
To | case Empty |
Modified TKSmartCardSlotState.Missing
Declaration | |
---|---|
From | case SlotStateMissing |
To | case Missing |
Modified TKSmartCardSlotState.MuteCard
Declaration | |
---|---|
From | case SlotStateMuteCard |
To | case MuteCard |
Modified TKSmartCardSlotState.Probing
Declaration | |
---|---|
From | case SlotStateProbing |
To | case Probing |
Modified TKSmartCardSlotState.ValidCard
Declaration | |
---|---|
From | case SlotStateValidCard |
To | case ValidCard |