/* See LICENSE file for copyright and license details. */ #include "libsha1.h" #include #include #include #include #include #include #include #ifndef ALLOCA_LIMIT # define ALLOCA_LIMIT 0 #endif /** * 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 * @param chunk The data to process */ #if defined(__GNUC__) __attribute__((__nonnull__, __nothrow__)) #endif void libsha1_process(struct libsha1_state *restrict, const unsigned char *restrict);