Platforms to show: All Mac Windows Linux Cross-Platform
Back to TKSmartCardMBS class.
TKSmartCardMBS.beginSession(tag as variant = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Mac64bit Plugin | 18.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This method will fail if there is already an existing session for the Smart Card.
Calls to this method must be balanced with calls to endSession.
Calls beginSessionCompleted event later.
Some examples using this method:
TKSmartCardMBS.beginSessionSync(byref error as NSErrorMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Mac64bit Plugin | 18.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This is the synchronous version, which waits for callback from operation system.
Returns true on success and false on failure.
This method will fail if there is already an existing session for the Smart Card.
Calls to this method must be balanced with calls to endSession.
TKSmartCardMBS.beginSessionWithDelegate(handler as beginSessionCompletedDelegateMBS, tag as variant = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Mac64bit Plugin | 18.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
request: The APDU request data.
You should only call this method after a session to the Smart Card has been established using the beginSessionWithReply: method, and before the session is terminated using the endSession method.
Invokes handler later, which has this declaration:
beginSessionCompletedDelegate(success as Boolean, error as NSErrorMBS, tag as Variant)
Some examples using this method:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Mac64bit Plugin | 18.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Mac64bit Plugin | 18.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Mac64bit Plugin | 18.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Calls to this method should balance calls to beginSession.
TKSmartCardMBS.inSession(byref error as NSErrorMBS, tag as variant = nil) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Mac64bit Plugin | 18.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
error: On return, if an error occurred when attempting to create a session or execute the block, contains details about the error.
Returns true if the session was successfully created and the inSession event returns true; otherwise, false.
See also:
TKSmartCardMBS.readFileWithDelegate(FileName as MemoryBlock, handler as readFileCompletedDelegateMBS, tag as variant = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Mac64bit Plugin | 18.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This is for Belgian ID card to read a file.
You should only call this method after a session to the Smart Card has been established using the beginSessionWithReply: method, and before the session is terminated using the endSession method.
Invokes handler later, which has this declaration:
readFileCompletedDelegateMBS(FileName as MemoryBlock, Content as MemoryBlock, error as NSErrorMBS, tag as Variant)
Some examples using this method:
TKSmartCardMBS.sendIns(ins as UInt8, p1 as UInt8, p2 as UInt8, requestData as MemoryBlock, le as Integer = 0, byref sw as Uint16, byref error as NSErrorMBS) as Memoryblock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Mac64bit Plugin | 18.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
ins: The instruction code.
p1: The first parameter.
p2: The second parameter.
requestData: The data field of the APDU, or nil if no input data field should be present—for example, a case1 or case2 APDU.
The length of the data serves as Lc field of the APDU.
le: The expected number of bytes to be returned, or zero if no output data are expected—for example, a case1 or case3 APDU. Pass 0 to accept as many bytes as the card provides.
sw: On return, contains the result code as represented by the first two bytes (SW1SW2) of the returned data.
error: On return, if an error occurred when attempting to create a session or execute the block, contains details about the error.
Returns the returned data without the first two bytes (SW1SW2), or nil if an error occurred.
See also:
TKSmartCardMBS.sendIns(ins as UInt8, p1 as UInt8, p2 as UInt8, requestData as MemoryBlock, le as Integer = 0, tag as variant = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Mac64bit Plugin | 18.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
ins: The instruction code.
p1: The first parameter.
p2: The second parameter.
requestData: The data field of the APDU, or nil if no input data field should be present—for example, a case1 or case2 APDU.
The length of the data serves as Lc field of the APDU.
le: The expected number of bytes to be returned, or zero if no output data are expected—for example, a case1 or case3 APDU. Pass 0 to accept as many bytes as the card provides.
Calls sendInsCompleted event later.
See also:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Mac64bit Plugin | 18.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Called for you by constructor.
TKSmartCardMBS.transmitRequest(request as MemoryBlock, tag as variant = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Mac64bit Plugin | 18.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
request: The APDU request data.
You should only call this method after a session to the Smart Card has been established using the beginSessionWithReply: method, and before the session is terminated using the endSession method.
Calls transmitRequestCompleted method later.
TKSmartCardMBS.transmitRequestSync(request as MemoryBlock, byref response as MemoryBlock, byref error as NSErrorMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Mac64bit Plugin | 18.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This is the synchronous version, which waits for callback from operation system.
request: The APDU request data.
response: The response.
You should only call this method after a session to the Smart Card has been established using the beginSessionWithReply: method, and before the session is terminated using the endSession method.
TKSmartCardMBS.transmitRequestWithDelegate(request as MemoryBlock, handler as transmitRequestCompletedDelegateMBS, tag as variant = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Mac64bit Plugin | 18.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
request: The APDU request data.
You should only call this method after a session to the Smart Card has been established using the beginSessionWithReply: method, and before the session is terminated using the endSession method.
Invokes handler later, which has this declaration:
transmitRequestCompletedDelegate(request as MemoryBlock, response as MemoryBlock, error as NSErrorMBS, tag as Variant)
TKSmartCardMBS.userInteractionForSecurePINChange(PINFormat as TKSmartCardPINFormatMBS, APDU as MemoryBlock, currentPINByteOffset as Integer, newPINByteOffset as Integer) as TKSmartCardUserInteractionForSecurePINChangeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Mac64bit Plugin | 18.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
PINFormat: The PIN format descriptor.
APDU: The Application Protocol Data Unit (APDU) used by the Smart Card to fill in PIN data.
currentPINByteOffset: The offset, in bytes, within the Application Protocol Data Unit (APDU) field to mark a location of a PIN block for filling in the entered PIN.
newPINByteOffset: The offset, in bytes, within the Application Protocol Data Unit (APDU) field to mark a location of a PIN block for filling in the new PIN.
Returns a new user interaction object for secure PIN verification, or nil if this feature is not supported by the Smart Card reader.
You should only call this method after a session to the Smart Card has been established using the beginSession method, and before the session is terminated using the endSession method.
Once the interaction has been successfully completed, the results are available via the resultData and resultSW properties of the returned TKSmartCardUserInteractionForSecurePINVerificationMBS object.
TKSmartCardMBS.userInteractionForSecurePINVerification(PINFormat as TKSmartCardPINFormatMBS, APDU as MemoryBlock, PINByteOffset as Integer) as TKSmartCardUserInteractionForSecurePINVerificationMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SmartCard | MBS Mac64bit Plugin | 18.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
PINFormat: The PIN format descriptor.
APDU: The Application Protocol Data Unit (APDU) used by the Smart Card to fill in PIN data.
PINByteOffset: The offset, in bytes, within the Application Protocol Data Unit (APDU) field to mark a location of a PIN block for filling in the entered PIN.
This parameter is not currently used. Pass 0.
Returns a new user interaction object for secure PIN verification, or nil if this feature is not supported by the Smart Card reader.
You should only call this method after a session to the Smart Card has been established using the beginSession method, and before the session is terminated using the endSession method.
Once the interaction has been successfully completed, the results are available via the resultData and resultSW properties of the returned TKSmartCardUserInteractionForSecurePINVerificationMBS object.
The items on this page are in the following plugins: MBS Mac64bit Plugin.