blob: 8f67f227b74917c8a5082bba1c9318a02be82714 [file] [log] [blame]
Jamie Fox598f6d42019-07-01 17:56:37 +01001/*
2 * Copyright (c) 2019, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8/** This file describes the PSA Internal Trusted Storage API
9*/
10
11#ifndef PSA_INTERNAL_TRUSTED_STORAGE_H
12#define PSA_INTERNAL_TRUSTED_STORAGE_H
13
14#include <stddef.h>
15#include <stdint.h>
16
17#include "psa/error.h"
18#include "psa/storage_common.h"
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23#define PSA_ITS_API_VERSION_MAJOR 1
24#define PSA_ITS_API_VERSION_MINOR 0
25
26// This version of the header file is associated with 1.0 final release.
27
28/**
29 * Create a new or modify an existing uid/value pair
30 */
31psa_status_t psa_its_set(psa_storage_uid_t uid,
32 size_t data_length,
33 const void *p_data,
34 psa_storage_create_flags_t create_flags);
35
36/**
37 * Retrieve data associated with a provided UID
38 */
39psa_status_t psa_its_get(psa_storage_uid_t uid,
40 size_t data_offset,
41 size_t data_size,
42 void *p_data,
43 size_t *p_data_length);
44
45/**
46 * Retrieve the metadata about the provided uid
47 */
48psa_status_t psa_its_get_info(psa_storage_uid_t uid,
49 struct psa_storage_info_t *p_info);
50
51/**
52 * Remove the provided key and its associated data from the storage
53 */
54psa_status_t psa_its_remove(psa_storage_uid_t uid);
55
56#ifdef __cplusplus
57}
58#endif
59
60#endif // PSA_INTERNAL_TRUSTED_STORAGE_H