mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
Fix formatting: remove trailing spaces, #endif with comments (> 10 lines)
This commit is contained in:
@ -107,7 +107,7 @@ static const unsigned char FSb[256] =
|
||||
#define SBOX3(n) (unsigned char)((FSb[(n)] >> 1 ^ FSb[(n)] << 7) & 0xff)
|
||||
#define SBOX4(n) FSb[((n) << 1 ^ (n) >> 7) &0xff]
|
||||
|
||||
#else
|
||||
#else /* POLARSSL_CAMELLIA_SMALL_MEMORY */
|
||||
|
||||
static const unsigned char FSb[256] =
|
||||
{
|
||||
@ -194,7 +194,7 @@ static const unsigned char FSb4[256] =
|
||||
#define SBOX3(n) FSb3[(n)]
|
||||
#define SBOX4(n) FSb4[(n)]
|
||||
|
||||
#endif
|
||||
#endif /* POLARSSL_CAMELLIA_SMALL_MEMORY */
|
||||
|
||||
static const unsigned char shifts[2][4][4] =
|
||||
{
|
||||
@ -268,13 +268,13 @@ static const signed char transposes[2][20] =
|
||||
(XR) = ((((XL) & (KL)) << 1) | (((XL) & (KL)) >> 31)) ^ (XR); \
|
||||
(XL) = ((XR) | (KR)) ^ (XL); \
|
||||
}
|
||||
|
||||
|
||||
#define FLInv(YL, YR, KL, KR) \
|
||||
{ \
|
||||
(YL) = ((YR) | (KR)) ^ (YL); \
|
||||
(YR) = ((((YL) & (KL)) << 1) | (((YL) & (KL)) >> 31)) ^ (YR); \
|
||||
}
|
||||
|
||||
|
||||
#define SHIFT_AND_PLACE(INDEX, OFFSET) \
|
||||
{ \
|
||||
TK[0] = KC[(OFFSET) * 4 + 0]; \
|
||||
@ -392,7 +392,7 @@ int camellia_setkey_enc( camellia_context *ctx, const unsigned char *key, unsign
|
||||
|
||||
/*
|
||||
* Generating subkeys
|
||||
*/
|
||||
*/
|
||||
|
||||
/* Manipulating KL */
|
||||
SHIFT_AND_PLACE(idx, 0);
|
||||
@ -691,14 +691,14 @@ static const unsigned char camellia_test_ecb_key[3][CAMELLIA_TESTS_ECB][32] =
|
||||
{
|
||||
{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
|
||||
0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 },
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
|
||||
},
|
||||
{
|
||||
{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
|
||||
0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10,
|
||||
0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 },
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
|
||||
},
|
||||
@ -707,7 +707,7 @@ static const unsigned char camellia_test_ecb_key[3][CAMELLIA_TESTS_ECB][32] =
|
||||
0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10,
|
||||
0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
|
||||
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
|
||||
@ -718,7 +718,7 @@ static const unsigned char camellia_test_ecb_plain[CAMELLIA_TESTS_ECB][16] =
|
||||
{
|
||||
{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
|
||||
0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 },
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
|
||||
};
|
||||
|
||||
@ -1048,6 +1048,6 @@ int camellia_self_test( int verbose )
|
||||
return ( 0 );
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* POLARSSL_SELF_TEST */
|
||||
|
||||
#endif
|
||||
#endif /* POLARSSL_CAMELLIA_C */
|
||||
|
Reference in New Issue
Block a user