mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-01-06 11:41:12 +03:00
Replace instances of byte reading macros with PUT
Instances of a group of byte reading macros which are equivilant to MBEDTLS_PUT_UINTx_yz Signed-off-by: Joe Subbiani <joe.subbiani@arm.com>
This commit is contained in:
@@ -164,10 +164,7 @@ static void chacha20_block( const uint32_t initial_state[16],
|
||||
{
|
||||
size_t offset = i * 4U;
|
||||
|
||||
keystream[offset ] = MBEDTLS_BYTE_0( working_state[i] );
|
||||
keystream[offset + 1U] = MBEDTLS_BYTE_1( working_state[i] );
|
||||
keystream[offset + 2U] = MBEDTLS_BYTE_2( working_state[i] );
|
||||
keystream[offset + 3U] = MBEDTLS_BYTE_3( working_state[i] );
|
||||
MBEDTLS_PUT_UINT32_LE(working_state[i], keystream, offset);
|
||||
}
|
||||
|
||||
mbedtls_platform_zeroize( working_state, sizeof( working_state ) );
|
||||
|
||||
Reference in New Issue
Block a user