1 /* Copyright (c) 2024 Nordic Semiconductor
2  * SPDX-License-Identifier: Apache-2.0
3  */
4 #ifndef SECURE_STORAGE_PS_H
5 #define SECURE_STORAGE_PS_H
6 
7 /** @file zephyr/secure_storage/ps.h The secure storage PS implementation.
8  *
9  * The functions declared in this header implement the PSA PS API
10  * when the secure storage subsystem is enabled.
11  * They must not be called directly, and this header must not be included other than when
12  * providing a custom implementation (@kconfig{CONFIG_SECURE_STORAGE_PS_IMPLEMENTATION_CUSTOM}).
13  */
14 #include <psa/storage_common.h>
15 
16 /** @brief See `psa_ps_set()`, to which this function is analogous. */
17 psa_status_t secure_storage_ps_set(const psa_storage_uid_t uid, size_t data_length,
18 				   const void *p_data, psa_storage_create_flags_t create_flags);
19 
20 /** @brief See `psa_ps_get()`, to which this function is analogous. */
21 psa_status_t secure_storage_ps_get(const psa_storage_uid_t uid, size_t data_offset,
22 				   size_t data_length, void *p_data, size_t *p_data_length);
23 
24 /** @brief See `psa_ps_get_info()`, to which this function is analogous. */
25 psa_status_t secure_storage_ps_get_info(const psa_storage_uid_t uid,
26 					struct psa_storage_info_t *p_info);
27 
28 /** @brief See `psa_ps_remove()`, to which this function is analogous. */
29 psa_status_t secure_storage_ps_remove(const psa_storage_uid_t uid);
30 
31 /** @brief See `psa_ps_create()`, to which this function is analogous. */
32 psa_status_t secure_storage_ps_create(psa_storage_uid_t uid, size_t capacity,
33 				      psa_storage_create_flags_t create_flags);
34 
35 /** @brief See `psa_ps_set_extended()`, to which this function is analogous. */
36 psa_status_t secure_storage_ps_set_extended(psa_storage_uid_t uid, size_t data_offset,
37 					    size_t data_length, const void *p_data);
38 
39 #endif
40