Wirepas SDK
wms_secure_storage.h
Go to the documentation of this file.
1/* Copyright 2024 Wirepas Ltd. All Rights Reserved.
2 *
3 * See file LICENSE.txt for full license details.
4 *
5 */
6
25#ifndef APP_LIB_SECURE_STORAGE_H_
26#define APP_LIB_SECURE_STORAGE_H_
27
28#include <stdlib.h>
29#include <stdint.h>
30#include <stdbool.h>
31
32#include "wms_app.h"
33#include "wms_memory_area.h"
34
36#define APP_LIB_SECURE_STORAGE_NAME 0x74be4415
37
39#define APP_LIB_SECURE_STORAGE_VERSION 0x200
40
51
56
65
90 uint32_t flags);
91
111 void * to, size_t * max_amount);
112
137 const void * from,
138 size_t amount,
139 uint32_t flags);
140
153
164
165#endif /* APP_LIB_SECURE_STORAGE_H_ */
app_lib_mem_area_res_e
memory area operations result
uint32_t app_lib_mem_area_id_t
Memory Area id definition.
app_lib_secure_storage_record_flags_e
Secure storage record option flags.
@ APP_LIB_SECURE_STORAGE_RECORD_FLAG_NO_ENCRYPT
@ APP_LIB_SECURE_STORAGE_RECORD_FLAG_NO_AUTH
uint32_t app_lib_secure_storage_record_tag_t
Secure storage record tag definition.
app_lib_mem_area_res_e(* app_lib_secure_storage_init_area_f)(app_lib_mem_area_id_t id, app_lib_secure_storage_command_e cmd, uint32_t flags)
Initialize secure storage area or check if already initialized.
app_lib_secure_storage_delete_record_f deleteRecord
app_lib_secure_storage_command_e
Secure storage initialization command.
@ APP_LIB_SECURE_STORAGE_CMD_INIT
@ APP_LIB_SECURE_STORAGE_CMD_NO_INIT
@ APP_LIB_SECURE_STORAGE_CMD_ERASE
app_lib_secure_storage_write_record_f writeRecord
app_lib_secure_storage_init_area_f initArea
app_lib_mem_area_res_e(* app_lib_secure_storage_read_record_f)(app_lib_mem_area_id_t id, app_lib_secure_storage_record_tag_t tag, void *to, size_t *max_amount)
Read a record from the secure storage area.
app_lib_mem_area_res_e(* app_lib_secure_storage_write_record_f)(app_lib_mem_area_id_t id, app_lib_secure_storage_record_tag_t tag, const void *from, size_t amount, uint32_t flags)
Write a record to the secure storage area, overwriting any previous version with the same record tag.
app_lib_mem_area_res_e(* app_lib_secure_storage_delete_record_f)(app_lib_mem_area_id_t id, app_lib_secure_storage_record_tag_t tag)
Delete a record in the secure storage area.
app_lib_secure_storage_read_record_f readRecord
List of library functions.