This is to prepare for SHA3 inclusion
safe-mkstemp.h \
sendfile-util.h \
seq-range-array.h \
+ sha-common.h \
sha1.h \
sha2.h \
sort.h \
--- /dev/null
+#ifndef SHA_COMMON
+
+#define SHA256_RESULTLEN (256 / 8)
+#define SHA256_BLOCK_SIZE (512 / 8)
+
+#define SHA512_RESULTLEN (512 / 8)
+#define SHA512_BLOCK_SIZE (1024 / 8)
+
+#endif
#define SHA2_H
#include "hash-method.h"
-
-#define SHA256_RESULTLEN (256 / 8)
-#define SHA256_BLOCK_SIZE (512 / 8)
-
-#define SHA512_RESULTLEN (512 / 8)
-#define SHA512_BLOCK_SIZE (1024 / 8)
+#include "sha-common.h"
struct sha256_ctx {
size_t tot_len;