Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
transform.h File Reference

The secure storage ITS transform module. More...

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.
 

Detailed Description

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 ).

Macro Definition Documentation

◆ SECURE_STORAGE_ITS_TRANSFORM_DATA_SIZE

#define SECURE_STORAGE_ITS_TRANSFORM_DATA_SIZE ( stored_data_len)
Value:
- CONFIG_SECURE_STORAGE_ITS_MAX_DATA_SIZE))
@ SECURE_STORAGE_ITS_TRANSFORM_MAX_STORED_DATA_SIZE
Definition transform.h:17

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

The maximum size, in bytes, of an entry's data after it has been transformed for storage.

Enumerator
SECURE_STORAGE_ITS_TRANSFORM_MAX_STORED_DATA_SIZE 

Function Documentation

◆ secure_storage_its_transform_from_store()

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.

Parameters
[in]uidThe entry's UID.
[in]stored_data_lenThe number of bytes in stored_data.
[in]stored_dataThe stored data to transform for use.
[in]data_sizeThe size of data in bytes.
[out]dataThe buffer to which the transformed data is written.
[out]data_lenOn success, the number of bytes written to stored_data.
[out]create_flagsOn success, the entry's create flags.
Returns
PSA_SUCCESS on success, anything else on failure.

◆ secure_storage_its_transform_to_store()

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.

Parameters
[in]uidThe entry's UID.
[in]data_lenThe number of bytes in data.
[in]dataThe data to transform for storage.
[in]create_flagsThe entry's create flags. It must contain only valid PSA_STORAGE_FLAG_* values. It gets stored as part of stored_data.
[out]stored_dataThe buffer to which the transformed data is written.
[out]stored_data_lenOn success, the number of bytes written to stored_data.
Returns
PSA_SUCCESS on success, anything else on failure.