Encrypted Advertising Data {#encrypted_advertising_data_0}

This section describes the Central and Peripheral setup for encrypted advertising data.

Central Setup

Use the Gap_DecryptAdvertisingData API to decrypt the contents of “Encrypted Advertising Data” (0x31) AD types included in scanned data.

bleResult_t Gap_DecryptAdvertisingData 
    (uint8_t *pData, uint16_t dataLength, const uint8_t *pKey, const uint8_t *pIV, uint8_t *pOutput)

Parent topic:Encrypted Advertising Data

Peripheral Setup

Use the Gap_EncryptAdvertisingData API to obtain the encrypted advertising data, which can then be placed inside the “Encrypted Advertising Data” (0x31) AD type.

bleResult_t Gap_EncryptAdvertisingData 
  ( const gapAdvertisingData_t *pAdvertisingData, const uint8_t *pKey, const uint8_t *pIV, uint8_t *pOutput )

Parent topic:Encrypted Advertising Data

Parent topic:Generic Access Profile (GAP) Layer