Function desfire::fs::create_ro_free_data_file

Function Documentation

result desfire::fs::create_ro_free_data_file(tag &tag, file_id fid, mlab::bin_data const &data)

Creates a read-only data file with free read access in the current application. The file can only be deleted afterwards, it is not possible to write on it. Reading does not require any authentication. This assumes the app is already selected, the user is already authenticated, if the security settings require so, and file fid does not exists. The caller is responsible for selecting the app and authenticating. No change in app and authentication is performed by this method.

Parameters:
  • tag – Tag on which to operate.

  • fid – The file id, in the range 0..15 (included).

  • data – Content of the file.

Returns:

Either mlab::result_success, or any of the error codes returned by tag::create_file, tag::write_data or tag::change_file_settings.