diff options
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -4,6 +4,7 @@ #include <sys/stat.h> #include <alloca.h> #include <errno.h> +#include <inttypes.h> #include <stdlib.h> #include <stddef.h> #include <string.h> @@ -16,6 +17,15 @@ /** + * Truncate an unsigned integer to an unsigned 32-bit integer + * + * @param X:uint_least32_t The value to truncate + * @return :uint_least32_t The 32 lowest bits in `X` + */ +#define TRUNC32(X) ((X) & (uint_least32_t)0xFFFFFFFFUL) + + +/** * Process a chunk using SHA-1 or SHA-0 * * @param state The hashing state |