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="scgetchallenge">
|
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_challenge</refentrytitle>
|
|
|
|
<manvolnum>3</manvolnum>
|
|
|
|
<refmiscinfo>opensc</refmiscinfo>
|
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
<refnamediv>
|
|
|
|
<refname>sc_get_challenge</refname>
|
|
|
|
<refpurpose>Request a challenge from a card</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Synopsis</title>
|
|
|
|
<para>
|
|
|
|
<programlisting>
|
|
|
|
#include <opensc.h>
|
|
|
|
|
|
|
|
int sc_get_challenge(struct sc_card *card, unsigned char *rnd, size_t len);
|
|
|
|
</programlisting>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<para>
|
|
|
|
This function requests a challenge (i.e. random bytes) from
|
|
|
|
<emphasis>card</emphasis>. The returned data will be stored in
|
|
|
|
<emphasis>rnd</emphasis>, and will be <emphasis>len</emphasis> bytes long.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Return value</title>
|
|
|
|
<para>
|
|
|
|
Returns 0 if successful, or a negative value in case of error.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|