Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
|
The secure storage ITS transform module. More...
#include <zephyr/secure_storage/its/common.h>
Go to the source code of this file.
Macros | |
#define | SECURE_STORAGE_ITS_TRANSFORM_DATA_SIZE(stored_data_len) |
Enumerations | |
enum | { SECURE_STORAGE_ITS_TRANSFORM_MAX_STORED_DATA_SIZE } |
The maximum size, in bytes, of an entry's data after it has been transformed for storage. More... | |
Functions | |
psa_status_t | secure_storage_its_transform_to_store (secure_storage_its_uid_t uid, size_t data_len, const void *data, secure_storage_packed_create_flags_t create_flags, uint8_t stored_data[static SECURE_STORAGE_ITS_TRANSFORM_MAX_STORED_DATA_SIZE], size_t *stored_data_len) |
Transforms the data of an ITS entry for storage. | |
psa_status_t | secure_storage_its_transform_from_store (secure_storage_its_uid_t uid, size_t stored_data_len, const uint8_t stored_data[static SECURE_STORAGE_ITS_TRANSFORM_MAX_STORED_DATA_SIZE], size_t data_size, void *data, size_t *data_len, psa_storage_create_flags_t *create_flags) |
Transforms and validates the stored data of an ITS entry for use. | |
The secure storage ITS transform module.
The functions declared in this header implement the ITS transform module. They are meant to be called only by the ITS implementation. This header may be included when providing a custom implementation of the ITS transform module (
CONFIG_SECURE_STORAGE_ITS_TRANSFORM_IMPLEMENTATION_CUSTOM
).
#define SECURE_STORAGE_ITS_TRANSFORM_DATA_SIZE | ( | stored_data_len | ) |
anonymous enum |
psa_status_t secure_storage_its_transform_from_store | ( | secure_storage_its_uid_t | uid, |
size_t | stored_data_len, | ||
const uint8_t | stored_data[static SECURE_STORAGE_ITS_TRANSFORM_MAX_STORED_DATA_SIZE], | ||
size_t | data_size, | ||
void * | data, | ||
size_t * | data_len, | ||
psa_storage_create_flags_t * | create_flags ) |
Transforms and validates the stored data of an ITS entry for use.
[in] | uid | The entry's UID. |
[in] | stored_data_len | The number of bytes in stored_data . |
[in] | stored_data | The stored data to transform for use. |
[in] | data_size | The size of data in bytes. |
[out] | data | The buffer to which the transformed data is written. |
[out] | data_len | On success, the number of bytes written to stored_data . |
[out] | create_flags | On success, the entry's create flags. |
PSA_SUCCESS
on success, anything else on failure. psa_status_t secure_storage_its_transform_to_store | ( | secure_storage_its_uid_t | uid, |
size_t | data_len, | ||
const void * | data, | ||
secure_storage_packed_create_flags_t | create_flags, | ||
uint8_t | stored_data[static SECURE_STORAGE_ITS_TRANSFORM_MAX_STORED_DATA_SIZE], | ||
size_t * | stored_data_len ) |
Transforms the data of an ITS entry for storage.
[in] | uid | The entry's UID. |
[in] | data_len | The number of bytes in data . |
[in] | data | The data to transform for storage. |
[in] | create_flags | The entry's create flags. It must contain only valid PSA_STORAGE_FLAG_* values. It gets stored as part of stored_data . |
[out] | stored_data | The buffer to which the transformed data is written. |
[out] | stored_data_len | On success, the number of bytes written to stored_data . |
PSA_SUCCESS
on success, anything else on failure.