From: bg Date: Tue, 18 Dec 2012 11:06:19 +0000 (+0100) Subject: whitespace inseration X-Git-Url: https://git.cryptolib.org/?p=avr-crypto-lib.git;a=commitdiff_plain;h=701d813c99a7bd164e98f82c5651e6e7bdab404a whitespace inseration --- diff --git a/keccak/keccak.h b/keccak/keccak.h index ff17657..736cbc8 100644 --- a/keccak/keccak.h +++ b/keccak/keccak.h @@ -23,13 +23,13 @@ #include #define KECCAK224_BLOCKSIZE 1152 -#define KECCAK224_BLOCKSIZE_B (KECCAK224_BLOCKSIZE/8) +#define KECCAK224_BLOCKSIZE_B (KECCAK224_BLOCKSIZE / 8) #define KECCAK256_BLOCKSIZE 1088 -#define KECCAK256_BLOCKSIZE_B (KECCAK256_BLOCKSIZE/8) +#define KECCAK256_BLOCKSIZE_B (KECCAK256_BLOCKSIZE / 8) #define KECCAK384_BLOCKSIZE 832 -#define KECCAK384_BLOCKSIZE_B (KECCAK384_BLOCKSIZE/8) +#define KECCAK384_BLOCKSIZE_B (KECCAK384_BLOCKSIZE / 8) #define KECCAK512_BLOCKSIZE 576 -#define KECCAK512_BLOCKSIZE_B (KECCAK512_BLOCKSIZE/8) +#define KECCAK512_BLOCKSIZE_B (KECCAK512_BLOCKSIZE / 8) typedef struct{ uint64_t a[5][5]; diff --git a/keccak/rotate64.h b/keccak/rotate64.h index 4d60c4c..a80d2b5 100644 --- a/keccak/rotate64.h +++ b/keccak/rotate64.h @@ -33,11 +33,11 @@ #define ROTR_3 (8+3) -#define ROT_BIT(a) (((a)<=4)?((a)<<1):(0x01|((8-(a))<<1))) +#define ROT_BIT(a) (((a) <= 4) ? ((a) << 1) : (0x01 | ((8 - (a)) << 1))) //#define ROT_CODE(a,b) (((a)<<4) | ((b)&0x0f)) -#define ROT_CODE(a) ((((a)/8+((((a)%8)>4)?1:0))<<4) | ROT_BIT(((a)%8))) +#define ROT_CODE(a) ((((a) / 8 + ((((a) % 8) > 4) ? 1 : 0)) << 4) | ROT_BIT(((a) % 8))) //#define ROT_CODE(a) ((((a)/8)<<4) | ((a)%8)) /* rotations only to the left */ uint64_t rotate64_1bit_left(uint64_t a);