⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 appendix-a.html

📁 Smart Card Developer s Kit, a smart card manual for development, English
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<TD>Invalid parameters
<TD>&nbsp;
<TD>&nbsp;
<TR>
<TD COLSPAN="4"><HR>
</TABLE>
<H4 ALIGN="LEFT"><A NAME="Heading9"></A><FONT COLOR="#000077">Read Record</FONT></H4>
<P><FONT SIZE="+1"><B>Description</B></FONT></P>
<P>This command provides for reading one to several records of a file that has an internal record structure.
</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT>Command Application Protocol Data Unit
<TR>
<TH WIDTH="10%" ALIGN="LEFT">CLA
<TH WIDTH="10%" ALIGN="LEFT">INS
<TH WIDTH="26%" ALIGN="LEFT">Parameter 1
<TH WIDTH="25%" ALIGN="LEFT">Parameter 2
<TH WIDTH="29%" ALIGN="LEFT">Parameter 3
<TR>
<TD COLSPAN="5"><HR>
<TR>
<TD VALIGN="TOP">C0<SUB>16</SUB>
<TD VALIGN="TOP">B2<SUB>16</SUB>
<TD VALIGN="TOP">Index of the record to be read (01<SUB>16</SUB>, 02<SUB>16</SUB>, ..., FF<SUB>16</SUB>) OR 00<SUB>16</SUB> if the current record is to be read
<TD>Selection of record to be read: 00 first record; 01 last record; 02 next record; 03 previous record; 04 current record; if index is 0 or index record if it isn&#146;t
<TD VALIGN="TOP">The number of bytes to be read from the record identified by P1 and P2; must be equal to the length of the record in the file
<TR>
<TD COLSPAN="5"><HR>
</TABLE>
<P>
</P>
<TABLE WIDTH="100%"><TR>
<TH WIDTH="25%" ALIGN="LEFT">Data Field 1
<TH WIDTH="75%" ALIGN="LEFT">Data Field 2
<TR>
<TD COLSPAN="2"><HR>
<TR>
<TD>Empty
<TD>Empty
<TR>
<TD COLSPAN="2"><HR>
</TABLE>
<P>
</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT>Response Application Protocol Data Unit
<TR>
<TH WIDTH="100%" ALIGN="LEFT">Response
<TR>
<TD><HR>
<TR>
<TD>The number of bytes in the record if the command is successful followed by the usual 2-byte status
<TR>
<TD><HR>
</TABLE>
<P>
</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT>Example of Use
<TR>
<TH WIDTH="45%" ALIGN="LEFT">APDU
<TH WIDTH="55%" ALIGN="LEFT">Interpretation
<TR>
<TD COLSPAN="2"><HR>
<TR>
<TD VALIGN="TOP">C0<SUB>16</SUB> B2<SUB>16</SUB> 06<SUB>16</SUB> 04<SUB>16</SUB> 14<SUB>16</SUB>
<TD>The records in the selected fixed-length record file are 20 bytes long; this command reads the sixth record in the file
<TR>
<TD COLSPAN="2"><HR>
</TABLE>
<P>
</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT>Error Codes (As Specified by ISO/IEC 7816-4: 1995(E))
<TR>
<TH WIDTH="20%" ALIGN="LEFT">Status
<TH WIDTH="30%" ALIGN="LEFT">Meaning
<TH WIDTH="20%" ALIGN="LEFT">Status
<TH WIDTH="30%" ALIGN="LEFT">Meaning
<TR>
<TD COLSPAN="4"><HR>
<TR>
<TD>6281<SUB>16</SUB>
<TD>Return data error
<TD>6282<SUB>16</SUB>
<TD>Premature EOF
<TR>
<TD>6700<SUB>16</SUB>
<TD>Incorrect Le field
<TD>6981<SUB>16</SUB>
<TD>Bad command
<TR>
<TD>6982<SUB>16</SUB>
<TD>Invalid security status
<TD>6A81<SUB>16</SUB>
<TD>Invalid function
<TR>
<TD>6A82<SUB>16</SUB>
<TD>File missing
<TD>6A83<SUB>16</SUB>
<TD>Missing record
<TR>
<TD>6CXX<SUB>16</SUB>
<TD>Wrong Le length
<TD>&nbsp;
<TD>&nbsp;
<TR>
<TD COLSPAN="4"><HR>
</TABLE>
<H4 ALIGN="LEFT"><A NAME="Heading10"></A><FONT COLOR="#000077">Write Record</FONT></H4>
<P><FONT SIZE="+1"><B>Description</B></FONT></P>
<P>This command provides for writing one record into a file that has an internal record structure. Depending on the file&#146;s attributes, the write operation may result in ANDing or ORing the bytes specified in the command with the values already in the file. For the example, we&#146;ll assume that the attributes are set for a one-time-write operation; that is, this will be the initial writing of data into this record of the file.
</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT>Command Application Protocol Data Unit
<TR>
<TH WIDTH="10%" ALIGN="LEFT">CLA
<TH WIDTH="10%" ALIGN="LEFT">INS
<TH WIDTH="26%" ALIGN="LEFT">Parameter 1
<TH WIDTH="25%" ALIGN="LEFT">Parameter 2
<TH WIDTH="29%" ALIGN="LEFT">Parameter 3
<TR>
<TD COLSPAN="5"><HR>
<TR>
<TD VALIGN="TOP">C0<SUB>16</SUB>
<TD VALIGN="TOP">D2<SUB>16</SUB>
<TD VALIGN="TOP">Index of the record to be written to (01<SUB>16</SUB>, 02<SUB>16</SUB>, &#133;, FF16) OR 0 if the current record is to be overwritten
<TD>Selection of record to be affected: 00 first record; 01 last record; 02 next record; 03 previous record; 04 current record; if index is 0 or index record if it isn&#146;t
<TD VALIGN="TOP">The number of bytes to be merged into the record identified by Parameter 1 and Parameter 2; must be equal to the length of the record in the file
<TR>
<TD COLSPAN="5"><HR>
</TABLE>
<P>
</P>
<TABLE WIDTH="100%"><TR>
<TH WIDTH="70%" ALIGN="LEFT">Data Field 1
<TH WIDTH="30%" ALIGN="LEFT">Data Field 2
<TR>
<TD COLSPAN="2"><HR>
<TR>
<TD>The data bytes to be written into the record identified by P1 and P2
<TD>Empty
<TR>
<TD COLSPAN="2"><HR>
</TABLE>
<P>
</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT>Response Application Protocol Data Unit
<TR>
<TH WIDTH="100%" ALIGN="LEFT">Response
<TR>
<TD><HR>
<TR>
<TD>2-byte status
<TR>
<TD><HR>
</TABLE>
<P>
</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT>Example of Use
<TR>
<TH WIDTH="50%" ALIGN="LEFT">APDU
<TH WIDTH="50%" ALIGN="LEFT">Interpretation
<TR>
<TD COLSPAN="2"><HR>
<TR>
<TD VALIGN="TOP">C0<SUB>16</SUB> D2<SUB>16</SUB> 06<SUB>16</SUB> 04<SUB>16</SUB> 14<SUB>16</SUB> 53<SUB>16</SUB> 61<SUB>16</SUB> 6C<SUB>16</SUB> 6C<SUB>16</SUB> 79<SUB>16</SUB> 20<SUB>16</SUB> 47<SUB>16</SUB> 72<SUB>16</SUB> 65<SUB>16</SUB> 65<SUB>16</SUB> 6E<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB>
<TD VALIGN="TOP">The records in the selected fixed-length record file are 20 bytes long; this command writes <TT>Sally Green</TT> into the sixth record in this file
<TR>
<TD COLSPAN="2"><HR>
</TABLE>
<P>
</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT>Error Codes (As Specified by ISO/IEC 7816-4: 1995(E))
<TR>
<TH WIDTH="20%" ALIGN="LEFT">Status
<TH WIDTH="30%" ALIGN="LEFT">Meaning
<TH WIDTH="20%" ALIGN="LEFT">Status
<TH WIDTH="30%" ALIGN="LEFT">Meaning
<TR>
<TD COLSPAN="4"><HR>
<TR>
<TD>63CX<SUB>16</SUB>
<TD>Success with retries
<TD>6581<SUB>16</SUB>
<TD>Invalid write
<TR>
<TD>6700<SUB>16</SUB>
<TD>Incorrect Le field
<TD>6981<SUB>16</SUB>
<TD>Bad command
<TR>
<TD>6982<SUB>16</SUB>
<TD>Invalid security status
<TD>6986<SUB>16</SUB>
<TD>EF not selected
<TR>
<TD>6A81<SUB>16</SUB>
<TD>Invalid function
<TD>6A82<SUB>16</SUB>
<TD>File missing
<TR>
<TD>6A83<SUB>16</SUB>
<TD>Missing record
<TD>6A84<SUB>16</SUB>
<TD>Insufficient file space
<TR>
<TD>6A85<SUB>16</SUB>
<TD>Invalid TLV
<TD>&nbsp;
<TD>&nbsp;
<TR>
<TD COLSPAN="4"><HR>
</TABLE>
<H4 ALIGN="LEFT"><A NAME="Heading11"></A><FONT COLOR="#000077">Append Record</FONT></H4>
<P><FONT SIZE="+1"><B>Description</B></FONT></P>
<P>This command provides for either the appending of a record at the end of an <TT>EF</TT> with a linear structure or the writing of the first record of a cyclic, structured file.</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT>Command Application Protocol Data Unit
<TR>
<TH WIDTH="10%" ALIGN="LEFT">CLA
<TH WIDTH="10%" ALIGN="LEFT">INS
<TH WIDTH="26%" ALIGN="LEFT">Parameter 1
<TH WIDTH="25%" ALIGN="LEFT">Parameter 2
<TH WIDTH="29%" ALIGN="LEFT">Parameter 3
<TR>
<TD COLSPAN="5"><HR>
<TR>
<TD VALIGN="TOP">C0<SUB>16</SUB>
<TD VALIGN="TOP">E2<SUB>16</SUB>
<TD VALIGN="TOP">00
<TD VALIGN="TOP">Short EF file identifier
<TD>The number of bytes in the append record
<TR>
<TD COLSPAN="5"><HR>
</TABLE>
<P>
</P>
<TABLE WIDTH="100%"><TR>
<TH WIDTH="45%" ALIGN="LEFT">Data Field 1
<TH WIDTH="55%" ALIGN="LEFT">Data Field 2
<TR>
<TD COLSPAN="2"><HR>
<TR>
<TD>Contents of the append record
<TD>Empty
<TR>
<TD COLSPAN="2"><HR>
</TABLE>
<P>
</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT>Response Application Protocol Data Unit
<TR>
<TH WIDTH="100%" ALIGN="LEFT">Response
<TR>
<TD><HR>
<TR>
<TD>2-byte status
<TR>
<TD><HR>
</TABLE>
<P>
</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT>Example of Use
<TR>
<TH WIDTH="55%" ALIGN="LEFT">APDU
<TH WIDTH="45%" ALIGN="LEFT">Interpretation
<TR>
<TD COLSPAN="2"><HR>
<TR>
<TD>C0<SUB>16</SUB> D2<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 14<SUB>16</SUB> 53<SUB>16</SUB> 61<SUB>16</SUB> 6C<SUB>16</SUB> 6C<SUB>16</SUB> 79<SUB>16</SUB> 20<SUB>16</SUB> 47<SUB>16</SUB> 72<SUB>16</SUB> 65<SUB>16</SUB> 65<SUB>16</SUB> 6E<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB>
<TD VALIGN="TOP">The records in the selected fixed-length record file are 20 bytes long; this command appends <TT>Sally Green</TT> onto the end of the EF
<TR>
<TD COLSPAN="2"><HR>
</TABLE>
<P>
</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT>Error Codes (As Specified by ISO/IEC 7816-4: 1995(E))
<TR>
<TH WIDTH="20%" ALIGN="LEFT">Status
<TH WIDTH="30%" ALIGN="LEFT">Meaning
<TH WIDTH="20%" ALIGN="LEFT">Status
<TH WIDTH="30%" ALIGN="LEFT">Meaning
<TR>
<TD COLSPAN="4"><HR>
<TR>
<TD>63CX<SUB>16</SUB>
<TD>Success with retries
<TD>6581<SUB>16</SUB>
<TD>Invalid write
<TR>
<TD>6700<SUB>16</SUB>
<TD>Incorrect Le field
<TD>6981<SUB>16</SUB>
<TD>Bad command
<TR>
<TD>6982<SUB>16</SUB>
<TD>Invalid security status
<TD>6986<SUB>16</SUB>
<TD>EF not selected
<TR>
<TD>6A81<SUB>16</SUB>
<TD>Invalid function
<TD>6A82<SUB>16</SUB>
<TD>File missing
<TR>
<TD>6A83<SUB>16</SUB>
<TD>Missing record
<TD>6A84<SUB>16</SUB>
<TD>Insufficient file space
<TR>
<TD>6A85<SUB>16</SUB>
<TD>Invalid TLV
<TD>&nbsp;
<TD>&nbsp;
<TR>
<TD COLSPAN="4"><HR>
</TABLE>
<H4 ALIGN="LEFT"><A NAME="Heading12"></A><FONT COLOR="#000077">Update Record</FONT></H4>
<P><FONT SIZE="+1"><B>Description</B></FONT></P>
<P>This command provides for updating (writing) a specific set of bytes in a specified record of a file.
</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT>Command Application Protocol Data Unit
<TR>
<TH WIDTH="10%" ALIGN="LEFT">CLA
<TH WIDTH="10%" ALIGN="LEFT">INS
<TH WIDTH="26%" ALIGN="LEFT">Parameter 1
<TH WIDTH="25%" ALIGN="LEFT">Parameter 2
<TH WIDTH="29%" ALIGN="LEFT">Parameter 3
<TR>
<TD COLSPAN="5"><HR>
<TR>
<TD VALIGN="TOP">C0<SUB>16</SUB>
<TD VALIGN="TOP">DC<SUB>16</SUB>
<TD VALIGN="TOP">Index of the record to be overwritten (01<SUB>16</SUB>, 02<SUB>16</SUB>, ..., FF<SUB>16</SUB>) OR 0 if the current record is to be overwritten
<TD>Selection of record to be overwritten: 00 first record; 01 last record; 02 next record; 03 previous record; 04 current record; if index is 0 or index record if it isn&#146;t
<TD VALIGN="TOP">The number of bytes to be written into the record identified by Parameter 1 and Parameter 2; must be equal to the length of the record in the file
<TR>
<TD COLSPAN="5"><HR>
</TABLE>
<P>
</P>
<TABLE WIDTH="100%"><TR>
<TH WIDTH="75%" ALIGN="LEFT">Data Field 1
<TH WIDTH="25%" ALIGN="LEFT">Data Field 2
<TR>
<TD COLSPAN="2"><HR>
<TR>
<TD>The data bytes to be written into the record identified by P1 and P2
<TD>Empty
<TR>
<TD COLSPAN="2"><HR>
</TABLE>
<P>
</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT>Response Application Protocol Data Unit
<TR>
<TH WIDTH="100%" ALIGN="LEFT">Response
<TR>
<TD><HR>
<TR>
<TD>2-byte status
<TR>
<TD><HR>
</TABLE>
<P>
</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT>Example of Use
<TR>
<TH WIDTH="55%" ALIGN="LEFT">APDU
<TH WIDTH="45%" ALIGN="LEFT">Interpretation
<TR>
<TD COLSPAN="2"><HR>
<TR>
<TD>C0<SUB>16</SUB> DC<SUB>16</SUB> 06<SUB>16</SUB> 04<SUB>16</SUB> 14<SUB>16</SUB> 53<SUB>16</SUB> 61<SUB>16</SUB> 6C<SUB>16</SUB> 6C<SUB>16</SUB> 79<SUB>16</SUB> 20<SUB>16</SUB> 47<SUB>16</SUB> 72<SUB>16</SUB> 65<SUB>16</SUB> 65<SUB>16</SUB> 6E<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB> 00<SUB>16</SUB>
<TD VALIGN="TOP">The records in the selected fixed-length record file are 20 bytes long; this command writes <TT>Sally Green</TT> into the sixth record in this file
<TR>
<TD COLSPAN="2"><HR>
</TABLE>
<P>
</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT>Error Codes (As Specified by ISO/IEC 7816-4: 1995(E))
<TR>
<TH WIDTH="20%" ALIGN="LEFT">Status
<TH WIDTH="30%" ALIGN="LEFT">Meaning
<TH WIDTH="20%" ALIGN="LEFT">Status
<TH WIDTH="30%" ALIGN="LEFT">Meaning
<TR>
<TD COLSPAN="4"><HR>
<TR>
<TD>63CX<SUB>16</SUB>
<TD>Success with retries
<TD>6581<SUB>16</SUB>
<TD>Invalid write
<TR>
<TD>6700<SUB>16</SUB>
<TD>Incorrect Le field
<TD>6981<SUB>16</SUB>
<TD>Bad command
<TR>
<TD>6982<SUB>16</SUB>
<TD>Invalid security status
<TD>6986<SUB>16</SUB>
<TD>EF not selected
<TR>
<TD>6A81<SUB>16</SUB>
<TD>Invalid function
<TD>6A82<SUB>16</SUB>
<TD>File missing
<TR>
<TD>6A83<SUB>16</SUB>
<TD>Missing record
<TD>6A84<SUB>16</SUB>
<TD>Insufficient file space
<TR>
<TD>6A85<SUB>16</SUB>
<TD>Invalid TLV
<TD>&nbsp;
<TD>&nbsp;
<TR>
<TD COLSPAN="4"><HR>
</TABLE>
<H4 ALIGN="LEFT"><A NAME="Heading13"></A><FONT COLOR="#000077">Get Data</FONT></H4>
<P><FONT SIZE="+1"><B>Description</B></FONT></P>
<P>This command provides for the reading of one primitive data object. In the context of this class of commands, a data object is one of two types of data structures: a BER-TLV structure or a SIMPLE-TLV structure. TLV means a <I>tag, length,</I> and <I>value</I> structure (that is, a structure where a tag field gives an identity to the structure, a length field gives a size [in bytes], and a value field contains the piece of information that is the reason for the existence of the structure).</P>
<P>In a SIMPLE-TLV data object, the tag field is a single byte containing a number that identifies the data object, the length field consists of 1 or 3 bytes in length (if 1 byte the length is 0 to 254 bytes, if three the length is 0 to 64K bytes), and the value field is a string of bytes of length given by the length field. A BER-TLV structure is defined by the ISO/IEC 8825 standard.</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT>Command Application Protocol Data Unit
<TR>
<TH WIDTH="10%" ALIGN="LEFT">CLA
<TH WIDTH="10%" ALIGN="LEFT">INS
<TH WIDTH="26%" ALIGN="LEFT">Parameter 1
<TH WIDTH="25%" ALIGN="LEFT">Parameter 2
<TH WIDTH="29%" ALIGN="LEFT">Parameter 3
<TR>
<TD COLSPAN="5"><HR>
<TR>
<TD>CO<SUB>16</SUB>
<TD>CA<SUB>16</SUB>
<TD>Data object
<TD>Identifier
<TD>Size of response Le
<TR>
<TD COLSPAN="5"><HR>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -