MW_MISC_EncryptAdvData
C
uint16_t MW_MISC_EncryptAdvData(MW_MISC_EncAdvData_T *p_encAdvData);Description
Encrypt advertising data.
Note
This function encrypts p_payload, package it as an Encrypted Data data type, and append the AD structure to p_advData. The length will increase by 11 bytes. The application must ensure that p_advData has sufficient space for the appended data.
Parameters
| Parameter | Description |
|---|---|
| [in] p_encAdvData | Pointer to the MW_MISC_EncAdvData_T structure. |
Return values
| Return value | Description |
|---|---|
| MBA_RES_SUCCESS | Encryption successfully. |
| MBA_RES_FAIL | Encryption failed. |
| MBA_RES_OOM | Internal memory allocation failure occurred. |
