Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

TKSmartCardMBS.beginSession(tag as variant = nil)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SmartCard MBS Mac64bit Plugin 18.5 Yes No No Yes, macOS only No
Function: Begins a session with the Smart Card.
Notes:
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.

Feedback, Comments & Corrections

TKSmartCardMBS.beginSessionSync(byref error as NSErrorMBS) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SmartCard MBS Mac64bit Plugin 18.5 Yes No No Yes, macOS only No
Function: Begins a session with the Smart Card.
Notes:
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.

Feedback, Comments & Corrections

TKSmartCardMBS.beginSessionWithDelegate(handler as beginSessionCompletedDelegateMBS, tag as variant = nil)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SmartCard MBS Mac64bit Plugin 18.5 Yes No No Yes, macOS only No
Function: Transmits data in Application Protocol Data Unit (APDU) format to the Smart Card.
Notes:
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)

Feedback, Comments & Corrections

TKSmartCardMBS.Constructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SmartCard MBS Mac64bit Plugin 18.5 Yes No No Yes, macOS only No
Function: The constructor.

Feedback, Comments & Corrections

TKSmartCardMBS.Destructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SmartCard MBS Mac64bit Plugin 18.5 Yes No No Yes, macOS only No
Function: The destructor.

Feedback, Comments & Corrections

TKSmartCardMBS.endSession
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SmartCard MBS Mac64bit Plugin 18.5 Yes No No Yes, macOS only No
Function: Completes any pending transmissions and ends the session to the Smart Card.
Notes: Calls to this method should balance calls to beginSession.

Feedback, Comments & Corrections

TKSmartCardMBS.inSession(byref error as NSErrorMBS, tag as variant = nil) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SmartCard MBS Mac64bit Plugin 18.5 Yes No No Yes, macOS only No
Function: Synchronously begins a session, executes the given block, and ends the session.
Notes:
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:

Feedback, Comments & Corrections

TKSmartCardMBS.readFileWithDelegate(FileName as MemoryBlock, handler as readFileCompletedDelegateMBS, tag as variant = nil)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SmartCard MBS Mac64bit Plugin 18.5 Yes No No Yes, macOS only No
Function: Reads file with given filename.
Notes:
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)

Feedback, Comments & Corrections

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 Console & Web iOS
method SmartCard MBS Mac64bit Plugin 18.5 Yes No No Yes, macOS only No
Function: Synchronously transmits an APDU command to the card and returns the response.
Notes:
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:

Feedback, Comments & Corrections

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 Console & Web iOS
method SmartCard MBS Mac64bit Plugin 18.5 Yes No No Yes, macOS only No
Function: Asynchronously transmits an APDU command to the card, returning the response in a completion handler.
Notes:
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:

Feedback, Comments & Corrections

TKSmartCardMBS.SetDelegate
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SmartCard MBS Mac64bit Plugin 18.5 Yes No No Yes, macOS only No
Function: Sets the observer to call validChanged event.
Notes: Called for you by constructor.

Feedback, Comments & Corrections

TKSmartCardMBS.transmitRequest(request as MemoryBlock, tag as variant = nil)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SmartCard MBS Mac64bit Plugin 18.5 Yes No No Yes, macOS only No
Function: Transmits data in Application Protocol Data Unit (APDU) format to the Smart Card.
Notes:
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.

Feedback, Comments & Corrections

TKSmartCardMBS.transmitRequestSync(request as MemoryBlock, byref response as MemoryBlock, byref error as NSErrorMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SmartCard MBS Mac64bit Plugin 18.5 Yes No No Yes, macOS only No
Function: Transmits data in Application Protocol Data Unit (APDU) format to the Smart Card.
Notes:
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.

Feedback, Comments & Corrections

TKSmartCardMBS.transmitRequestWithDelegate(request as MemoryBlock, handler as transmitRequestCompletedDelegateMBS, tag as variant = nil)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SmartCard MBS Mac64bit Plugin 18.5 Yes No No Yes, macOS only No
Function: Transmits data in Application Protocol Data Unit (APDU) format to the Smart Card.
Notes:
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)

Feedback, Comments & Corrections

TKSmartCardMBS.userInteractionForSecurePINChange(PINFormat as TKSmartCardPINFormatMBS, APDU as MemoryBlock, currentPINByteOffset as Integer, newPINByteOffset as Integer) as TKSmartCardUserInteractionForSecurePINChangeMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SmartCard MBS Mac64bit Plugin 18.5 Yes No No Yes, macOS only No
Function: Creates a new user interaction object for secure PIN change using the smart card reader facilities (typically a HW keypad).
Notes:
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.

Feedback, Comments & Corrections

TKSmartCardMBS.userInteractionForSecurePINVerification(PINFormat as TKSmartCardPINFormatMBS, APDU as MemoryBlock, PINByteOffset as Integer) as TKSmartCardUserInteractionForSecurePINVerificationMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SmartCard MBS Mac64bit Plugin 18.5 Yes No No Yes, macOS only No
Function: Creates and returns a new user interaction object for secure PIN verification using the Smart Card reader facilities.
Notes:
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.

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Mac64bit Plugin.




Links
MBS Xojo Plugins