size_t length, uint8_t *digest)
{
GCM_DIGEST(ctx, aes_encrypt, length, digest);
-
}
(p)[1] = ((i) >> 8) & 0xff; \
(p)[0] = (i) & 0xff; \
} while (0)
-
+
#define LE_READ_UINT32(p) \
( (((uint32_t) (p)[3]) << 24) \
| (((uint32_t) (p)[2]) << 16) \
just 32 - n and 64 - n results in undefined behaviour). Most uses
of these macros use a constant and non-zero rotation count. */
#define ROTL32(n,x) (((x)<<(n)) | ((x)>>((-(n)&31))))
-
+
#define ROTL64(n,x) (((x)<<(n)) | ((x)>>((-(n))&63)))
/* Requires that size > 0 */
/* Set the first char of padding to 0x80. This is safe since there \
is always at least one byte free */ \
\
- assert(__md_i < sizeof((ctx)->block)); \
- (ctx)->block[__md_i++] = 0x80; \
+ assert(__md_i < sizeof((ctx)->block)); \
+ (ctx)->block[__md_i++] = 0x80; \
\
if (__md_i > (sizeof((ctx)->block) - (size))) \
{ /* No room for length in this block. Process it and \
} \
memset((ctx)->block + __md_i, 0, \
sizeof((ctx)->block) - (size) - __md_i); \
- \
+ \
} while (0)
#endif /* NETTLE_MACROS_H_INCLUDED */