mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Tidy up grouped MBEDTLS_BYTE_x macros
exchange groups of the byte reading macros with MBEDTLS_PUT_UINTxyz and then shift the pointer afterwards. Easier to read as you can see how big the data is that you are putting in, and in the case of UINT32 AND UINT64 it saves some vertical space. Signed-off-by: Joe Subbiani <joe.subbiani@arm.com>
This commit is contained in:
@ -493,9 +493,8 @@ static void ssl_mac( mbedtls_md_context_t *md_ctx,
|
||||
padlen = 40;
|
||||
|
||||
memcpy( header, ctr, 8 );
|
||||
header[ 8] = (unsigned char) type;
|
||||
header[ 9] = MBEDTLS_BYTE_1( len );
|
||||
header[10] = MBEDTLS_BYTE_0( len );
|
||||
header[8] = (unsigned char) type;
|
||||
header[9] = MBEDTLS_PUT_UINT16_BE( len, header, 9);
|
||||
|
||||
memset( padding, 0x36, padlen );
|
||||
mbedtls_md_starts( md_ctx );
|
||||
|
Reference in New Issue
Block a user