shared/gatt-db: Generate database hash
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 5 Mar 2018 09:33:48 +0000 (11:33 +0200)
committerhimanshu <h.himanshu@samsung.com>
Tue, 11 Feb 2020 08:57:47 +0000 (14:27 +0530)
commit33b557621f94fb325751a802f9a2e6cfab85af26
tree71d3d161e8b503755ffb520c3526dc69b9fc84b0
parent1b634553aae56cc57906ae3ef84dac115ded5a6f
shared/gatt-db: Generate database hash

This use bt_crypto_hash (AES-CMAC) to generate a database hash
using the content of the attribute:

In ascending order of attribute handles, starting with the first handle,
concatenate the fields Attribute Handle, Attribute Type, and Attribute
Value if the attribute has one of the following types:
«Primary Service», «Secondary Service», «Included Service»,
«Characteristic», or «Characteristic Extended Properties», concatenate
the fields Attribute Handle and Attribute Type if the attribute has one
of the following types: «Characteristic User Description»,
«Client Characteristic Configuration»,
«Server Characteristic Configuration», «Characteristic Format», or
«Characteristic Aggregate Format», and ignore the attribute if it has
any other type (such attributes are not part of the concatenation).

Change-Id: If27ed2e2a6bfbf2549492061c928cf64afbaf10e
Signed-off-by: himanshu <h.himanshu@samsung.com>
src/shared/gatt-db.c