public class TKSmartCard extends NSObject
| Modifier and Type | Class and Description |
|---|---|
static interface |
TKSmartCard.Block_beginSessionWithReply |
static interface |
TKSmartCard.Block_inSessionWithErrorExecuteBlock |
static interface |
TKSmartCard.Block_sendInsP1P2DataLeReply |
static interface |
TKSmartCard.Block_transmitRequestReply |
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
TKSmartCard(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
static TKSmartCard |
alloc() |
static TKSmartCard |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
long |
allowedProtocols()
Bitmask containing allowed protocols to be used when communicating with the card.
|
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
void |
beginSessionWithReply(TKSmartCard.Block_beginSessionWithReply reply)
Begins session with the card.
|
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
byte |
cla()
CLA byte which will be used for sendIns: APDU transmits.
|
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
java.lang.Object |
context()
User-specified context kept as long as the card is powered.
|
long |
currentProtocol()
Protocol used for communication with the SmartCard.
|
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
void |
endSession()
Terminates the transaction.
|
static long |
hash_static() |
TKSmartCard |
init() |
boolean |
inSessionWithErrorExecuteBlock(org.moe.natj.general.ptr.Ptr<NSError> error,
TKSmartCard.Block_inSessionWithErrorExecuteBlock block)
Synchronous variant of session creation.
|
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
static TKSmartCard |
new_objc() |
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
void |
sendInsP1P2DataLeReply(byte ins,
byte p1,
byte p2,
NSData requestData,
NSNumber le,
TKSmartCard.Block_sendInsP1P2DataLeReply reply)
Transmits APDU to the card and returns response.
|
NSData |
sendInsP1P2DataLeSwError(byte ins,
byte p1,
byte p2,
NSData requestData,
NSNumber le,
org.moe.natj.general.ptr.CharPtr sw,
org.moe.natj.general.ptr.Ptr<NSError> error)
Transmits APDU to the card and returns response.
|
boolean |
sensitive()
Flag indicating whether card session should be considered as sensitive.
|
void |
setAllowedProtocols(long value)
Bitmask containing allowed protocols to be used when communicating with the card.
|
void |
setCla(byte value)
CLA byte which will be used for sendIns: APDU transmits.
|
void |
setContext(java.lang.Object value)
User-specified context kept as long as the card is powered.
|
void |
setSensitive(boolean value)
Flag indicating whether card session should be considered as sensitive.
|
void |
setUseCommandChaining(boolean value)
Flag indicating whether command chaining of APDU with data field longer than 255 bytes can be used.
|
void |
setUseExtendedLength(boolean value)
Flag indicating whether extended length APDUs should be used.
|
static void |
setVersion_static(long aVersion) |
TKSmartCardSlot |
slot()
Slot in which is this card inserted.
|
static org.moe.natj.objc.Class |
superclass_static() |
void |
transmitRequestReply(NSData request,
TKSmartCard.Block_transmitRequestReply reply)
Transmits raw command to the card.
|
boolean |
useCommandChaining()
Flag indicating whether command chaining of APDU with data field longer than 255 bytes can be used.
|
boolean |
useExtendedLength()
Flag indicating whether extended length APDUs should be used.
|
TKSmartCardUserInteractionForSecurePINChange |
userInteractionForSecurePINChangeWithPINFormatAPDUCurrentPINByteOffsetNewPINByteOffset(TKSmartCardPINFormat PINFormat,
NSData APDU,
long currentPINByteOffset,
long newPINByteOffset)
Creates a new user interaction object for secure PIN change using the SmartCard reader facilities (typically a HW keypad).
|
TKSmartCardUserInteractionForSecurePINVerification |
userInteractionForSecurePINVerificationWithPINFormatAPDUPINByteOffset(TKSmartCardPINFormat PINFormat,
NSData APDU,
long PINByteOffset)
Creates a new user interaction object for secure PIN verification using the SmartCard reader facilities (typically a HW keypad).
|
boolean |
valid()
Flag indicating whether card is valid, i.e.
|
static long |
version_static() |
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static TKSmartCard alloc()
public static TKSmartCard allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public long allowedProtocols()
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public void beginSessionWithReply(TKSmartCard.Block_beginSessionWithReply reply)
When session exists, other requests for sessions from other card objects to the same card are blocked. Session is reference-counted, the same amount of 'end' calls must be done to really terminate the session. Note that finishing session does not automatically mean that the card is disconnected; it only happens when another session from different card object is requested.
success - Signals whether session was successfully started.error - More information about error preventing the transaction to startpublic static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public byte cla()
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public java.lang.Object context()
public long currentProtocol()
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public void endSession()
public static long hash_static()
public boolean inSessionWithErrorExecuteBlock(org.moe.natj.general.ptr.Ptr<NSError> error, TKSmartCard.Block_inSessionWithErrorExecuteBlock block)
error - Error receiving more information when transaction failed to start or block failed for some reason.block - Block to be executed when the session was successfully begun.public TKSmartCard init()
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static TKSmartCard new_objc()
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public void sendInsP1P2DataLeReply(byte ins,
byte p1,
byte p2,
NSData requestData,
NSNumber le,
TKSmartCard.Block_sendInsP1P2DataLeReply reply)
Asynchronous high level variant of command for transmitting APDU to the card. Handles all ISO7816-4 APDU cases translation to proper sequences according to used protocol. Consults useExtendedAPDU and useCommandChaining properties and uses these modes whenever appropriate and beneficial for sending requested APDU request.
ins - INS code of the APDUp1 - P1 code of the APDUp2 - P2 code of the APDUrequestData - Data field of the APDU, or nil if no input data field should be present (i.e case1 or case2 APDUs). Length of the data serves as Lc field of the APDU.le - Expected number of bytes to be returned, or nil if no output data are expected (i.e. case1 or case3 APDUs). To get as much bytes as card provides, pass @0.replyData - Block of returned data without SW1SW2 bytes, or nil if an error occured.sw - SW1SW2 result code, first two bytes of returned card's reply.error - Contains error details when nil is returned. Specific error is also filled in if there was no communication error, but card returned other SW code than 0x9000.public NSData sendInsP1P2DataLeSwError(byte ins, byte p1, byte p2, NSData requestData, NSNumber le, org.moe.natj.general.ptr.CharPtr sw, org.moe.natj.general.ptr.Ptr<NSError> error)
Synchronous high level variant of command for transmitting APDU to the card. Handles all ISO7816-4 APDU cases translation to proper sequences according to used protocol. Should be used in block passed to -[TKSmartCard inSessionWithError:executeBlock:] method.
ins - INS code of the APDUp1 - P1 code of the APDUp2 - P2 code of the APDUdata - Data field of the APDU. Length of the data serves as Lc field of the APDUle - Expected number of bytes to be returned, or nil if no output data are expected (i.e. case1 or case3 APDUs). To get as much bytes as card provides, pass @0.sw - On output, filled with SW1SW2 result codeerror - Contains error details when nil is returned. Specific error is also filled in if there was no communication error, but card returned other SW code than 0x9000.public boolean sensitive()
public void setAllowedProtocols(long value)
public void setCla(byte value)
public void setContext(java.lang.Object value)
public void setSensitive(boolean value)
public void setUseCommandChaining(boolean value)
public void setUseExtendedLength(boolean value)
public static void setVersion_static(long aVersion)
public TKSmartCardSlot slot()
public static org.moe.natj.objc.Class superclass_static()
public void transmitRequestReply(NSData request, TKSmartCard.Block_transmitRequestReply reply)
request - Request part of APDUreponse - Response part of APDU, or nil if communication with the card failederror - Error details when communication with the card failedpublic boolean useCommandChaining()
public boolean useExtendedLength()
public TKSmartCardUserInteractionForSecurePINChange userInteractionForSecurePINChangeWithPINFormatAPDUCurrentPINByteOffsetNewPINByteOffset(TKSmartCardPINFormat PINFormat, NSData APDU, long currentPINByteOffset, long newPINByteOffset)
PINFormat - PIN format descriptor.APDU - Predefined APDU in which the SmartCard reader fills in the PIN(s).currentPINByteOffset - Offset in bytes within APDU data field to mark a location of a PIN block for filling in the current PIN.newPINByteOffset - Offset in bytes within APDU data field to mark a location of a PIN block for filling in the new PIN.public TKSmartCardUserInteractionForSecurePINVerification userInteractionForSecurePINVerificationWithPINFormatAPDUPINByteOffset(TKSmartCardPINFormat PINFormat, NSData APDU, long PINByteOffset)
PINFormat - PIN format descriptor.APDU - Predefined APDU in which the SmartCard reader fills in the PIN.PINByteOffset - Offset in bytes within APDU data field to mark a location of a PIN block for filling in the entered PIN (currently unused, must be 0).public boolean valid()
public static long version_static()