GATTS_SetMinEncKeySize
C
uint16_t GATTS_SetMinEncKeySize(uint8_t svcUuidLength, uint8_t *p_svcUuid, uint8_t minKeySize);Description
Set minimum encryption key length of a service.
Note
This function is used to set minimum key size requirement for accessing attributes in a GATT Service. Some of attributes required encryption permission to be accessed by remote client. Encryption with shorter key will be rejected when accessing those attributes. If this function is not called for the Service,minimum encryption key size requirement is 16 bytes by default.
Parameters
| Parameter | Description |
|---|---|
| [in] svcUuidLength | Length of the Service UUID. |
| [in] p_svcUuid | Pointer to Service UUID buffer. UUID in little endian format. |
| [in] minKeySize | Minimum encryption key size requirement of the Service. |
Return values
| Return value | Description |
|---|---|
| MBA_RES_SUCCESS | Successfully set the minimum key size of the Service. |
| MBA_RES_OOM | Memory allocation failure occurred internally. |
| MBA_RES_INVALID_PARA | Invalid Service UUID specified. |
