2005-03-02 00:30:24 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2005-02-23 02:52:20 +00:00
|
|
|
<refentry id="scgetdata">
|
2005-03-02 00:30:24 +00:00
|
|
|
<refentryinfo><title>OpenSC API Reference</title></refentryinfo>
|
2005-02-23 02:52:20 +00:00
|
|
|
<refmeta>
|
|
|
|
<refentrytitle>sc_get_data</refentrytitle>
|
|
|
|
<manvolnum>3</manvolnum>
|
|
|
|
<refmiscinfo>opensc</refmiscinfo>
|
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
<refnamediv>
|
|
|
|
<refname>sc_get_data</refname>
|
|
|
|
<refpurpose>Get a primitive data object from a card</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Synopsis</title>
|
|
|
|
<para>
|
|
|
|
<programlisting>
|
|
|
|
#include <opensc.h>
|
|
|
|
|
|
|
|
int sc_get_data(sc_card_t *card, unsigned int tag,
|
|
|
|
unsigned char *buf, size_t buflen);
|
|
|
|
</programlisting>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<para>
|
|
|
|
This function is used to retrieve a primitive data object from
|
|
|
|
<emphasis>card</emphasis>. It corresponds to the GET DATA command in the
|
2007-03-15 07:59:01 +00:00
|
|
|
ISO 7816 standard. The data is stored in
|
2005-02-23 02:52:20 +00:00
|
|
|
<emphasis>buf</emphasis>, which is <emphasis>buflen</emphasis> bytes long.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
The <emphasis>tag</emphasis> parameter specifies the object to be retrieved.
|
|
|
|
Refer to the standard for the correct values to use.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Return value</title>
|
|
|
|
<para>
|
|
|
|
Returns 0 if successful, or a negative value in case of error.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|