nRF Connect SDK API 2.8.0
Loading...
Searching...
No Matches
protected_storage.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7/* This file describes the PSA Protected Storage API */
8
9#ifndef PSA_PROTECTED_STORAGE_H
10#define PSA_PROTECTED_STORAGE_H
11
12#include <stddef.h>
13#include <stdint.h>
14
15#include "psa/error.h"
16#include "psa/storage_common.h"
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
33#define PSA_PS_API_VERSION_MAJOR 1
34#define PSA_PS_API_VERSION_MINOR 0
35
36/* This version of the header file is associated with 1.0 final release */
37
73psa_status_t psa_ps_set(psa_storage_uid_t uid, size_t data_length, const void *p_data,
74 psa_storage_create_flags_t create_flags);
75
119psa_status_t psa_ps_get(psa_storage_uid_t uid, size_t data_offset, size_t data_size, void *p_data,
120 size_t *p_data_length);
121
148psa_status_t psa_ps_get_info(psa_storage_uid_t uid, struct psa_storage_info_t *p_info);
149
174psa_status_t psa_ps_remove(psa_storage_uid_t uid);
175
209psa_status_t psa_ps_create(psa_storage_uid_t uid, size_t capacity,
210 psa_storage_create_flags_t create_flags);
211
260psa_status_t psa_ps_set_extended(psa_storage_uid_t uid, size_t data_offset, size_t data_length,
261 const void *p_data);
262
272uint32_t psa_ps_get_support(void);
273
277#ifdef __cplusplus
278}
279#endif
280
281#endif /* PSA_PROTECTED_STORAGE_H */
psa_status_t psa_ps_remove(psa_storage_uid_t uid)
Remove the provided uid and its associated data from the storage.
psa_status_t psa_ps_set_extended(psa_storage_uid_t uid, size_t data_offset, size_t data_length, const void *p_data)
Sets partial data into an asset.
psa_status_t psa_ps_get(psa_storage_uid_t uid, size_t data_offset, size_t data_size, void *p_data, size_t *p_data_length)
Retrieve data associated with a provided uid.
uint32_t psa_ps_get_support(void)
Lists optional features.
psa_status_t psa_ps_create(psa_storage_uid_t uid, size_t capacity, psa_storage_create_flags_t create_flags)
Reserves storage for the specified uid.
psa_status_t psa_ps_set(psa_storage_uid_t uid, size_t data_length, const void *p_data, psa_storage_create_flags_t create_flags)
Create a new, or modify an existing, uid/value pair.
psa_status_t psa_ps_get_info(psa_storage_uid_t uid, struct psa_storage_info_t *p_info)
Retrieve the metadata about the provided uid.