Class CommandInterpreter
Class implementing a command interpreter that handles ISO 7816-4 command APDUs
Defined in: CommandInterpreter.js.
Constructor Attributes | Constructor Name and Description |
---|---|
CommandInterpreter(fileSelector)
Create a command interpreter
|
Method Attributes | Method Name and Description |
---|---|
changeReferenceData(the)
Performs a CHANGE REFERENCE DATA command
|
|
dispatch(apdu, ins)
Dispatch to command handler based on instruction code
|
|
handleSecMsgCommandAPDU(apdu)
Process a secure messaging command APDU, if secure messaging is active.
|
|
handleSecMsgResponseAPDU(apdu)
Process a secure messaging response APDU, if secure messaging is active
|
|
Return status of secure channel
|
|
Process a MANAGE SECURITY ENVIRONMENT APDU
|
|
processAPDU(apdu)
Process a command APDU
|
|
readBinary(apdu)
Process a READ BINARY APDU
|
|
readRecord(apdu)
Process a READ RECORD APDU
|
|
resetRetryCounter(the)
Performs a RESET RETRY COUNTER command
|
|
setSecureChannel(secureChannel)
Set secure channel
|
|
updateBinary(apdu)
Process an UPDATE BINARY APDU
|
|
verify(the)
Performs a VERIFY command
|
Class Detail
CommandInterpreter(fileSelector)
Create a command interpreter
- Parameters:
- {FileSelector} fileSelector
- the file selector object
Method Detail
changeReferenceData(the)
Performs a CHANGE REFERENCE DATA command
- Parameters:
- {APDU} the
- apdu
dispatch(apdu, ins)
Dispatch to command handler based on instruction code
- Parameters:
- {APDU} apdu
- the command and response APDU
- {Number} ins
- instruction code
handleSecMsgCommandAPDU(apdu)
Process a secure messaging command APDU, if secure messaging is active.
- Parameters:
- {APDU} apdu
- the command APDU
handleSecMsgResponseAPDU(apdu)
Process a secure messaging response APDU, if secure messaging is active
- Parameters:
- {APDU} apdu
- the response APDU
{boolean}
hasSecureChannel()
Return status of secure channel
- Returns:
- true if secure channel is active
manageSecurityEnvironment(apdu)
Process a MANAGE SECURITY ENVIRONMENT APDU
- Parameters:
- {APDU} apdu
- the command and response APDU
processAPDU(apdu)
Process a command APDU
- Parameters:
- {APDU} apdu
- the command and response APDU
readBinary(apdu)
Process a READ BINARY APDU
- Parameters:
- {APDU} apdu
- the command and response APDU
readRecord(apdu)
Process a READ RECORD APDU
- Parameters:
- {APDU} apdu
- the command and response APDU
resetRetryCounter(the)
Performs a RESET RETRY COUNTER command
- Parameters:
- {APDU} the
- apdu
setSecureChannel(secureChannel)
Set secure channel
- Parameters:
- {SecureChannel} secureChannel
- the secure channel to used for unwrapping and wrapping APDUs
updateBinary(apdu)
Process an UPDATE BINARY APDU
- Parameters:
- {APDU} apdu
- the command and response APDU
verify(the)
Performs a VERIFY command
- Parameters:
- {APDU} the
- apdu