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>
diff --git a/library/ccm.c b/library/ccm.c
index 0188075..a21a37f 100644
--- a/library/ccm.c
+++ b/library/ccm.c
@@ -221,8 +221,7 @@
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 );