opensc/doc/api/card/sc_put_data.xml

50 lines
1.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<refentry id="scputdata">
<refentryinfo><title>OpenSC API Reference</title></refentryinfo>
<refmeta>
<refentrytitle>sc_put_data</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>opensc</refmiscinfo>
</refmeta>
<refnamediv>
<refname>sc_put_data</refname>
<refpurpose>Store a primitive data object on a card</refpurpose>
</refnamediv>
<refsect1>
<title>Synopsis</title>
<para>
<programlisting>
#include &lt;opensc.h&gt;
int sc_put_data(sc_card_t *card, unsigned int tag,
const unsigned char *buf, size_t len);
</programlisting>
</para>
</refsect1>
<refsect1>
<title>Description</title>
<para>
This function is used to store a primitive data object on
<emphasis>card</emphasis>. It corresponds to the PUT DATA command in the
ISO 7816 standard. The data to be sent to the
card is stored in <emphasis>buf</emphasis>, which is
<emphasis>buflen</emphasis> bytes long.
</para>
<para>
The <emphasis>tag</emphasis> parameter specifies the object to be stored.
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>