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

◆ hw_unique_key_write()

int hw_unique_key_write ( enum hw_unique_key_slot  key_slot,
const uint8_t *  key 
)

#include <include/hw_unique_key.h>

Write a Hardware Unique Key to the KMU.

This can only be done once (until a mass erase happens). This function waits for the flash operation to finish before returning.

Parameters
[in]key_slotThe keyslot to write to, see HUK_KEYSLOT_*.
[in]keyThe key to write. Must be HUK_SIZE_BYTES bytes long.
Returns
HW_UNIQUE_KEY_SUCCESS on success, otherwise a negative hardware unique key error code