Lines Matching +full:size +full:- +full:in +full:- +full:bytes
2 * SPDX-License-Identifier: Apache-2.0
25 /** Randomizer size in bytes */
27 /** Key size in bytes */
29 /** Initialisation Vector size in bytes */
31 /** MIC size in bytes */
34 /** Get the size (in bytes) of the encrypted advertising data for a given
35 * payload size in bytes.
40 /** Get the size (in bytes) of the decrypted payload for a given payload size in
41 * bytes.
44 ((encrypted_payload_size) - (BT_EAD_RANDOMIZER_SIZE + BT_EAD_MIC_SIZE))
49 * The resulting data in @p encrypted_payload will look like that:
50 * - Randomizer is added in the @ref BT_EAD_RANDOMIZER_SIZE first bytes;
51 * - Encrypted payload is added ( @p payload_size bytes);
52 * - MIC is added in the last @ref BT_EAD_MIC_SIZE bytes.
60 * @param[in] session_key Key of @ref BT_EAD_KEY_SIZE bytes used for the
62 * @param[in] iv Initialisation Vector used to generate the nonce. It must be
64 * @param[in] payload Advertising Data to encrypt. Can be multiple advertising
66 * @param[in] payload_size Size of the Advertising Data to encrypt.
68 * the MIC. Size must be at least @ref BT_EAD_RANDOMIZER_SIZE + @p
70 * BT_EAD_ENCRYPTED_PAYLOAD_SIZE to get the right size.
73 * @retval -EIO Error occurred during the encryption or the authentication.
74 * @retval -EINVAL One of the argument is a NULL pointer.
75 * @retval -ECANCELED Error occurred during the random number generation.
86 * @param[in] session_key Key of 16 bytes used for the encryption.
87 * @param[in] iv Initialisation Vector used to generate the `nonce`.
88 * @param[in] encrypted_payload Encrypted Advertising Data received. This
91 * @param[in] encrypted_payload_size Size of the received advertising data in
92 * bytes. Should be equal to the length field of the received
93 * advertising structure, minus the size of the type (1 byte).
95 * BT_EAD_DECRYPTED_PAYLOAD_SIZE to get the right size.
98 * @retval -EIO Error occurred during the decryption or the authentication.
99 * @retval -EINVAL One of the argument is a NULL pointer or @p