Implements an APDU Response
Namespace:
Cryptware.NSCAPIAssembly: NSCAPI (in NSCAPI.dll)
Syntax
| Visual Basic (Declaration) |
|---|
<ComVisibleAttribute(True)> _ <ClassInterfaceAttribute(ClassInterfaceType.AutoDual)> _ <GuidAttribute("EF3AD61F-BE0E-41bc-9546-5D514C32DDE0")> _ Public Class ResponseAPDU _ Implements IResponseAPDU |
| C# |
|---|
[ComVisibleAttribute(true)] [ClassInterfaceAttribute(ClassInterfaceType.AutoDual)] [GuidAttribute("EF3AD61F-BE0E-41bc-9546-5D514C32DDE0")] public class ResponseAPDU : IResponseAPDU |
| Visual C++ |
|---|
[ComVisibleAttribute(true)] [ClassInterfaceAttribute(ClassInterfaceType::AutoDual)] [GuidAttribute(L"EF3AD61F-BE0E-41bc-9546-5D514C32DDE0")] public ref class ResponseAPDU : IResponseAPDU |
| JavaScript |
|---|
Cryptware.NSCAPI.ResponseAPDU = function(); Type.createClass( 'Cryptware.NSCAPI.ResponseAPDU', null, Cryptware.NSCAPI.IResponseAPDU); |
Remarks
The response from the smart card after a command is codified in a Response APDU.
The response APDU is composed by an optional DATA field followed by two mandatory bytes, SW1 (Status Word 1) and SW2 (Status Word 2), called Status Words.
SW1 and SW2 hold the final processing status which specifies a successful processing or an error if one has occurred.
Specifically, SW1 = 0x90 and e SW2 = 0x00 indicate a successful command.
In that case the DATA field contains the response of the processing (if any, depending on the command).
If the response to a command contains more bytes than what is expected (i.e. it is longer than the value specified on LE field)
SW1 is set to 0x91 or to 0x61 and SW2 is set to the number of bytes still available.
Other values for SW1/SW2 indicate an error condition as defined by Part 4 of the standard.