BLE_OTAPS_SetEncrytionInfo
C
uint16_t BLE_OTAPS_SetEncrytionInfo(uint8_t * p_iv, uint8_t * p_key);
Description
Sets the Initialization Vector (IV) and encryption key for AES-CBC decryption of the new OTA DFU image.
Note
This function must be called before starting the BLE OTA procedure if the image is encrypted.
Parameters
Parameter | Description |
---|---|
[in] p_iv | Pointer to the 16-byte IV. |
[in] p_key | Pointer to the 16-byte encryption key. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | IV and key set successfully. |
MBA_RES_BAD_STATE | Operation failed because OTA is in progress. |