mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Improve documentation and add more uses of MBEDTLS_PUT
minor changes, such as improving the documentation for the byte reading macros, and using MBEDTLS_PUT_UINT16_xy in place of byte reading macro combinations Signed-off-by: Joe Subbiani <joe.subbiani@arm.com>
This commit is contained in:
@ -221,8 +221,7 @@ static int ccm_auth_crypt( mbedtls_ccm_context *ctx, int mode, size_t length,
|
||||
src = add;
|
||||
|
||||
memset( b, 0, 16 );
|
||||
b[0] = MBEDTLS_BYTE_1( add_len );
|
||||
b[1] = MBEDTLS_BYTE_0( add_len );
|
||||
MBEDTLS_PUT_UINT16_BE( add_len, b, 0 );
|
||||
|
||||
use_len = len_left < 16 - 2 ? len_left : 16 - 2;
|
||||
memcpy( b + 2, src, use_len );
|
||||
|
Reference in New Issue
Block a user