OPTIGA™ Trust M
Host Library Documentation
pal_os_datastore.h
Go to the documentation of this file.
1 
39 #ifndef _PAL_OS_DATASTORE_H_
40 #define _PAL_OS_DATASTORE_H_
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 #include "optiga/pal/pal.h"
47 
49 #define OPTIGA_PLATFORM_BINDING_SHARED_SECRET_ID (0x11)
50 
52 #define OPTIGA_SHARED_SECRET_MAX_LENGTH (0x40)
53 
54 // Persistant data store is not configured
55 #define OPTIGA_LIB_PAL_DATA_STORE_NOT_CONFIGURED (0x00)
56 
57 // !!!OPTIGA_LIB_PORTING_REQUIRED
58 // Identifier to store and read OPTIGA Shielded connection manage context on host platform,
59 // If the manage context data is to be stored in volatile memory only,
60 // set OPTIGA_COMMS_MANAGE_CONTEXT_ID to OPTIGA_LIB_PAL_DATA_STORE_NOT_CONFIGURED.
61 #define OPTIGA_COMMS_MANAGE_CONTEXT_ID (0x22)
62 
63 // !!!OPTIGA_LIB_PORTING_REQUIRED
64 // Identifier to store and read OPTIGA application context handle on host platform,
65 // If the application context data is to be stored in volatile memory only,
66 // set OPTIGA_COMMS_MANAGE_CONTEXT_ID to OPTIGA_LIB_PAL_DATA_STORE_NOT_CONFIGURED.
67 #define OPTIGA_HIBERNATE_CONTEXT_ID (0x33)
68 
71 #define APP_CONTEXT_SIZE (0x08)
72 
94 pal_status_t pal_os_datastore_read(uint16_t datastore_id,
95  uint8_t * p_buffer,
96  uint16_t * p_buffer_length);
97 
118 pal_status_t pal_os_datastore_write(uint16_t datastore_id,
119  const uint8_t * p_buffer,
120  uint16_t length);
121 
122 #ifdef __cplusplus
123 }
124 #endif
125 
126 #endif /* _PAL_OS_DATASTORE_H_ */
127 
pal_status_t
uint16_t pal_status_t
PAL return status.
Definition: examples/tools/protected_update_data_set/include/pal/pal_crypt.h:54
pal_os_datastore_read
pal_status_t pal_os_datastore_read(uint16_t datastore_id, uint8_t *p_buffer, uint16_t *p_buffer_length)
Reads data from the specified location for a given datastore_id.
pal.h
This file provides the prototype declarations of platform abstraction layer.
pal_os_datastore_write
pal_status_t pal_os_datastore_write(uint16_t datastore_id, const uint8_t *p_buffer, uint16_t length)
Writes data to the specified location for a given datastore_id.