1SC_READ_BINARY(3)            OpenSC API reference            SC_READ_BINARY(3)
2
3
4

NAME

6       sc_read_binary - Read a file
7

SYNOPSIS

9          #include <opensc.h>
10
11          int sc_read_binary(struct sc_card *card, unsigned int offset,
12                             unsigned char *buf, size_t count,
13                             unsigned long flags);
14
15
16

DESCRIPTION

18       This function reads from a transparent elementary file (EF) on card. It
19       corresponds to the ISO 7816 READ BINARY function. Call sc_select_file()
20       first to select the file to read from.
21
22       The data read from the file is stored in buf, which is count bytes
23       long.
24
25       The offset argument specifies the file offset in bytes. The flags
26       argument is currently not used, and should be set to 0.
27

RETURN VALUE

29       If successful, the number of bytes read is returned. Otherwise, a
30       negative value is returned.
31
32
33
34opensc                            05/04/2007                 SC_READ_BINARY(3)
Impressum