mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Prefixed macros with MBEDTLS
As per tests/scripts/check-names.sh, macros in library/ header files should be prefixed with MBEDTLS_ The macro functions in common.h where also indented to comply with the same test Signed-off-by: Joe Subbiani <joe.subbiani@arm.com>
This commit is contained in:
@ -567,7 +567,7 @@ int mbedtls_aes_setkey_enc( mbedtls_aes_context *ctx, const unsigned char *key,
|
||||
|
||||
for( i = 0; i < ( keybits >> 5 ); i++ )
|
||||
{
|
||||
GET_UINT32_LE( RK[i], key, i << 2 );
|
||||
MBEDTLS_GET_UINT32_LE( RK[i], key, i << 2 );
|
||||
}
|
||||
|
||||
switch( ctx->nr )
|
||||
@ -850,10 +850,10 @@ int mbedtls_internal_aes_encrypt( mbedtls_aes_context *ctx,
|
||||
uint32_t Y[4];
|
||||
} t;
|
||||
|
||||
GET_UINT32_LE( t.X[0], input, 0 ); t.X[0] ^= *RK++;
|
||||
GET_UINT32_LE( t.X[1], input, 4 ); t.X[1] ^= *RK++;
|
||||
GET_UINT32_LE( t.X[2], input, 8 ); t.X[2] ^= *RK++;
|
||||
GET_UINT32_LE( t.X[3], input, 12 ); t.X[3] ^= *RK++;
|
||||
MBEDTLS_GET_UINT32_LE( t.X[0], input, 0 ); t.X[0] ^= *RK++;
|
||||
MBEDTLS_GET_UINT32_LE( t.X[1], input, 4 ); t.X[1] ^= *RK++;
|
||||
MBEDTLS_GET_UINT32_LE( t.X[2], input, 8 ); t.X[2] ^= *RK++;
|
||||
MBEDTLS_GET_UINT32_LE( t.X[3], input, 12 ); t.X[3] ^= *RK++;
|
||||
|
||||
for( i = ( ctx->nr >> 1 ) - 1; i > 0; i-- )
|
||||
{
|
||||
@ -887,10 +887,10 @@ int mbedtls_internal_aes_encrypt( mbedtls_aes_context *ctx,
|
||||
( (uint32_t) FSb[ ( t.Y[1] >> 16 ) & 0xFF ] << 16 ) ^
|
||||
( (uint32_t) FSb[ ( t.Y[2] >> 24 ) & 0xFF ] << 24 );
|
||||
|
||||
PUT_UINT32_LE( t.X[0], output, 0 );
|
||||
PUT_UINT32_LE( t.X[1], output, 4 );
|
||||
PUT_UINT32_LE( t.X[2], output, 8 );
|
||||
PUT_UINT32_LE( t.X[3], output, 12 );
|
||||
MBEDTLS_PUT_UINT32_LE( t.X[0], output, 0 );
|
||||
MBEDTLS_PUT_UINT32_LE( t.X[1], output, 4 );
|
||||
MBEDTLS_PUT_UINT32_LE( t.X[2], output, 8 );
|
||||
MBEDTLS_PUT_UINT32_LE( t.X[3], output, 12 );
|
||||
|
||||
mbedtls_platform_zeroize( &t, sizeof( t ) );
|
||||
|
||||
@ -923,10 +923,10 @@ int mbedtls_internal_aes_decrypt( mbedtls_aes_context *ctx,
|
||||
uint32_t Y[4];
|
||||
} t;
|
||||
|
||||
GET_UINT32_LE( t.X[0], input, 0 ); t.X[0] ^= *RK++;
|
||||
GET_UINT32_LE( t.X[1], input, 4 ); t.X[1] ^= *RK++;
|
||||
GET_UINT32_LE( t.X[2], input, 8 ); t.X[2] ^= *RK++;
|
||||
GET_UINT32_LE( t.X[3], input, 12 ); t.X[3] ^= *RK++;
|
||||
MBEDTLS_GET_UINT32_LE( t.X[0], input, 0 ); t.X[0] ^= *RK++;
|
||||
MBEDTLS_GET_UINT32_LE( t.X[1], input, 4 ); t.X[1] ^= *RK++;
|
||||
MBEDTLS_GET_UINT32_LE( t.X[2], input, 8 ); t.X[2] ^= *RK++;
|
||||
MBEDTLS_GET_UINT32_LE( t.X[3], input, 12 ); t.X[3] ^= *RK++;
|
||||
|
||||
for( i = ( ctx->nr >> 1 ) - 1; i > 0; i-- )
|
||||
{
|
||||
@ -960,10 +960,10 @@ int mbedtls_internal_aes_decrypt( mbedtls_aes_context *ctx,
|
||||
( (uint32_t) RSb[ ( t.Y[1] >> 16 ) & 0xFF ] << 16 ) ^
|
||||
( (uint32_t) RSb[ ( t.Y[0] >> 24 ) & 0xFF ] << 24 );
|
||||
|
||||
PUT_UINT32_LE( t.X[0], output, 0 );
|
||||
PUT_UINT32_LE( t.X[1], output, 4 );
|
||||
PUT_UINT32_LE( t.X[2], output, 8 );
|
||||
PUT_UINT32_LE( t.X[3], output, 12 );
|
||||
MBEDTLS_PUT_UINT32_LE( t.X[0], output, 0 );
|
||||
MBEDTLS_PUT_UINT32_LE( t.X[1], output, 4 );
|
||||
MBEDTLS_PUT_UINT32_LE( t.X[2], output, 8 );
|
||||
MBEDTLS_PUT_UINT32_LE( t.X[3], output, 12 );
|
||||
|
||||
mbedtls_platform_zeroize( &t, sizeof( t ) );
|
||||
|
||||
|
Reference in New Issue
Block a user