Program Listing for File fs.hpp
↰ Return to documentation for file (libspookyaction/include/desfire/fs.hpp
)
//
// Created by spak on 11/24/22.
//
#ifndef DESFIRE_FS_HPP
#define DESFIRE_FS_HPP
#include <desfire/tag.hpp>
namespace desfire::fs {
result<> create_ro_data_file(tag &tag, file_id fid, mlab::bin_data const &data, key_actor<free_access_t> read_access, file_security security);
result<> create_ro_value_file(tag &tag, file_id fid, std::int32_t value, key_actor<free_access_t> read_access, file_security security);
result<> create_ro_free_data_file(tag &tag, file_id fid, mlab::bin_data const &data);
result<> create_ro_free_value_file(tag &tag, file_id fid, std::int32_t value);
result<> logout_app(tag &tag);
result<> login_app(tag &tag, app_id aid, any_key const &key);
result<> make_app_ro(tag &tag, bool list_requires_auth);
[[nodiscard]] result<any_key> create_app_for_ro(tag &tag, cipher_type cipher, app_id aid, random_oracle rng);
result<> create_app(tag &tag, app_id aid, any_key master_key, key_rights const &rights, std::uint8_t extra_keys = 0);
result<> delete_file_if_exists(tag &tag, file_id fid);
result<> delete_app_if_exists(tag &tag, app_id aid);
[[nodiscard]] result<bool> does_file_exist(tag &tag, file_id fid);
[[nodiscard]] result<std::vector<file_id>> which_files_exist(tag &tag, std::vector<file_id> fids);
[[nodiscard]] result<bool> does_app_exist(tag &tag, app_id aid);
}// namespace desfire::fs
#endif//DESFIRE_FS_HPP