nRF Connect SDK API 0.1.0
|
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.
[in] | uid | The uid value |
[in] | data_offset | The starting offset of the data requested |
[in] | data_size | The amount of data requested |
[out] | p_data | On success, the buffer where the data will be placed |
[out] | p_data_length | On success, this will contain size of the data placed in p_data |
PSA_SUCCESS | The operation completed successfully |
PSA_ERROR_DOES_NOT_EXIST | The operation failed because the provided uid value was not found in the storage |
PSA_ERROR_STORAGE_FAILURE | The operation failed because the physical storage has failed (Fatal error) |
PSA_ERROR_INVALID_ARGUMENT | The 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 |