32 #ifndef SecurityDefinesHPP 33 #define SecurityDefinesHPP 46 #define SHFR(x, n) (x >> n) 47 #define ROTR(x, n) ((x >> n) | (x << ((sizeof(x) << 3) - n))) 48 #define ROTL(x, n) ((x << n) | (x >> ((sizeof(x) << 3) - n))) 49 #define CH(x, y, z) ((x & y) ^ (~x & z)) 50 #define MAJ(x, y, z) ((x & y) ^ (x & z) ^ (y & z)) 54 #define PACK32(str, x)\ 56 *(x) = ((Uint32) *((str) + 3)) | \ 57 ((Uint32) *((str) + 2) << 8) | \ 58 ((Uint32) *((str) + 1) << 16) | \ 59 ((Uint32) *((str) + 0) << 24); \ 64 #define UNPACK32(x, str) \ 66 *((str) + 3) = (Uint8) ((x)); \ 67 *((str) + 2) = (Uint8) ((x) >> 8); \ 68 *((str) + 1) = (Uint8) ((x) >> 16); \ 69 *((str) + 0) = (Uint8) ((x) >> 24); \ 74 #define PACK64(str, x) \ 76 *(x) = ((Uint64) *((str) + 7) ) | \ 77 ((Uint64) *((str) + 6) << 8) | \ 78 ((Uint64) *((str) + 5) << 16) | \ 79 ((Uint64) *((str) + 4) << 24) | \ 80 ((Uint64) *((str) + 3) << 32) | \ 81 ((Uint64) *((str) + 2) << 40) | \ 82 ((Uint64) *((str) + 1) << 48) | \ 83 ((Uint64) *((str) + 0) << 56); \ 88 #define UNPACK64(x, str) \ 90 *((str) + 7) = (Uint8) ((x)); \ 91 *((str) + 6) = (Uint8) ((x) >> 8); \ 92 *((str) + 5) = (Uint8) ((x) >> 16); \ 93 *((str) + 4) = (Uint8) ((x) >> 24); \ 94 *((str) + 3) = (Uint8) ((x) >> 32); \ 95 *((str) + 2) = (Uint8) ((x) >> 40); \ 96 *((str) + 1) = (Uint8) ((x) >> 48); \ 97 *((str) + 0) = (Uint8) ((x) >> 56); \ 102 #if defined(ZEUS_LITTLE_ENDIAN) 105 #define HOST_c2l(c,l) (\ 106 l =(((Uint32)(*((c)++))) ), \ 107 l|=(((Uint32)(*((c)++)))<< 8), \ 108 l|=(((Uint32)(*((c)++)))<<16), \ 109 l|=(((Uint32)(*((c)++)))<<24), \ 113 #define HOST_l2c(l,c) (\ 114 *((c)++)=(Uint8)(((l) )&0xff), \ 115 *((c)++)=(Uint8)(((l)>> 8)&0xff), \ 116 *((c)++)=(Uint8)(((l)>>16)&0xff), \ 117 *((c)++)=(Uint8)(((l)>>24)&0xff), \ 121 #else //defined(ZEUS_BIG_ENDIAN) 123 #define HOST_c2l(c,l) (\ 124 l =(((Uint32)(*((c)++)))<<24), \ 125 l|=(((Uint32)(*((c)++)))<<16), \ 126 l|=(((Uint32)(*((c)++)))<< 8), \ 127 l|=(((Uint32)(*((c)++))) ), \ 132 #define HOST_l2c(l,c) (\ 133 *((c)++)=(Uint8)(((l)>>24)&0xff), \ 134 *((c)++)=(Uint8)(((l)>>16)&0xff), \ 135 *((c)++)=(Uint8)(((l)>> 8)&0xff), \ 136 *((c)++)=(Uint8)(((l) )&0xff), \ 139 #endif //defined(ZEUS_BIG_ENDIAN) 143 #ifdef ZEUS_BIG_ENDIAN 144 #define SWAP(n) (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24)) Definition: SecurityDefines.hpp:41
ECryptType
Definition: SecurityDefines.hpp:39
Definition: SecurityDefines.hpp:42