1SC_UPDATE_BINARY(3) OpenSC API reference SC_UPDATE_BINARY(3)
2
3
4
6 sc_update_binary - Write to an existing file
7
9 #include <opensc.h>
10
11 int sc_update_binary(struct sc_card *card, unsigned int offset,
12 const unsigned char *buf, size_t count,
13 unsigned long flags);
14
15
16
18 This function writes count bytes from the buffer pointed to by buf to a
19 transparent elementary file (EF) on card. It corresponds to the ISO
20 7816 UPDATE BINARY function. Call sc_select_file() first to select the
21 file to write to.
22
23 This function can only be used to write to a file region previously
24 written to. For writing to a newly created file, or a new region of an
25 existing file, use sc_write_binary().
26
27 The offset argument specifies the file offset in bytes. The flags
28 argument is currently not used, and should be set to 0.
29
31 If successful, the number of bytes written is returned. Otherwise, a
32 negative value is returned.
33
34
35
36opensc 05/04/2007 SC_UPDATE_BINARY(3)