sc_update_binary(3)

sc_update_binary3

Write to an existing file

Usage

#include <opensc.h>
int sc_update_binary(struct sc_card *card, unsigned int offset,
                     const unsigned char *buf, size_t count,
                     unsigned long flags);

Overview

This function writes count bytes from the buffer pointed to by buf to a transparent elementary file (EF) on card. It corresponds to the ISO 7816 UPDATE BINARY function. Call sc_select_file() first to select the file to write to.

This function can only be used to write to a file region previously written to. For writing to a newly created file, or a new region of an existing file, use sc_write_binary().

The offset argument specifies the file offset in bytes. The flags argument is currently not used, and should be set to 0.

Return value

If successful, the number of bytes written is returned. Otherwise, a negative value is returned.

Releases

3 releases since Debian 4.0 (Etch); the text changed 2 times.

  1. 4.0
  2. 5.0
  3. 6.0

From libopensc2-dev 0.11.13-1.1 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.