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

◆ cracen_import_key()

psa_status_t cracen_import_key ( const psa_key_attributes_t * attributes,
const uint8_t * data,
size_t data_length,
uint8_t * key_buffer,
size_t key_buffer_size,
size_t * key_buffer_length,
size_t * key_bits )

#include <subsys/nrf_security/src/drivers/cracen/cracenpsa/include/cracen_psa_key_management.h>

Import a key.

Parameters
[in]attributesKey attributes.
[in]dataKey data to import.
[in]data_lengthLength of the key data in bytes.
[out]key_bufferBuffer to represent the stored key.
[in]key_buffer_sizeSize of the key buffer in bytes.
[out]key_buffer_lengthLength of key buffer for the imported key in bytes.
[out]key_bitsSize of the key in bits.
Return values
PSA_SUCCESSThe operation completed successfully.
PSA_ERROR_INVALID_ARGUMENTThe key data is invalid.
PSA_ERROR_BUFFER_TOO_SMALLThe key buffer is too small.