TI BLE CC2541 protocol stack data encryption and decryption function
Source: Internet
Author: User
TI ble protocol stack comes with data encryption and decryption function, there are two functions, respectively, are encrypted and decrypted, each function is three parameters, are 16 bytes, if the actual data less than 16 bytes, after the completion of their own, after the encryption via Bluetooth, the other device received this data, inverse, get 16 bytes of data, Take the number of bytes you need (if characteristic value is only 1 bytes, take 1 bytes.)
Ll_encrypt (key, data, EncryptedData); Cryptographic functions Ll_ext_decrypt (key, EncryptedData, Deccrypteddata); Decryption function
The following is the actual routine code: Host (Client) code---> is mainly to receive data after decryption, fetch the number
Slave (Server) code----> primarily encrypts data and sends
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.