Function desfire::fs::create_ro_value_file
Defined in File fs.hpp
Function Documentation
-
result desfire::fs::create_ro_value_file(tag &tag, file_id fid, std::int32_t value, key_actor<free_access_t> read_access, file_security security)
Creates a read-only value file the specified
read_access
in the current application. The file can only be deleted afterwards, it is not possible to change its value. Reading the value requires authentication depending on the value ofread_access
. This assumes the app is already selected, the user is already authenticated, if the security settings require so, and filefid
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..7 (included).
value – Value of the file.
read_access – The read access to apply to file_access_rights::read.
security – Security to use for this file. Note that if
read_access
is set to free_access, this file might as well use file_security::none.
- Returns:
Either
mlab::result_success
, or any of the error codes returned by tag::create_file.