nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ psa_its_get()

psa_status_t psa_its_get ( psa_storage_uid_t  uid,
size_t  data_offset,
size_t  data_size,
void *  p_data,
size_t *  p_data_length 
)

#include <include/internal_trusted_storage.h>

Retrieve data associated with a provided UID.

Retrieves up to data_size bytes of the data associated with uid, starting at data_offset bytes from the beginning of the data. Upon successful completion, the data will be placed in the p_data buffer, which must be at least data_size bytes in size. The length of the data returned will be in p_data_length. If data_size is 0, the contents of p_data_length will be set to zero.

Parameters
[in]uidThe uid value
[in]data_offsetThe starting offset of the data requested
[in]data_sizeThe amount of data requested
[out]p_dataOn success, the buffer where the data will be placed
[out]p_data_lengthOn success, this will contain size of the data placed in p_data
Returns
A status indicating the success/failure of the operation
Return values
PSA_SUCCESSThe operation completed successfully
PSA_ERROR_DOES_NOT_EXISTThe operation failed because the provided uid value was not found in the storage
PSA_ERROR_STORAGE_FAILUREThe operation failed because the physical storage has failed (Fatal error)
PSA_ERROR_INVALID_ARGUMENTThe operation failed because one of the provided arguments (p_data, p_data_length) is invalid, for example is NULL or references memory the caller cannot access. In addition, this can also happen if data_offset is larger than the size of the data associated with uid