aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-01-08 22:57:27 +0100
committerMattias Andrée <maandree@kth.se>2022-01-08 22:57:27 +0100
commit12abd974fdf8362d41d688c478528c6b8047fa87 (patch)
tree096ace7f908e66089f379248e9fe036a85e4a1cb /common.h
parentAdd last_node parameter to libblake_blake2[sb]_digest (diff)
downloadlibblake-12abd974fdf8362d41d688c478528c6b8047fa87.tar.gz
libblake-12abd974fdf8362d41d688c478528c6b8047fa87.tar.bz2
libblake-12abd974fdf8362d41d688c478528c6b8047fa87.tar.xz
Add BLAKE2X
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'common.h')
-rw-r--r--common.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/common.h b/common.h
index 740d37e..b1920dc 100644
--- a/common.h
+++ b/common.h
@@ -5,12 +5,22 @@
#include <inttypes.h>
#include <string.h>
+#if !defined(UINT_LEAST64_C) && defined(UINT64_C)
+# define UINT_LEAST64_C(X) UINT64_C(X)
+#elif !defined(UINT_LEAST64_C)
+# define UINT_LEAST64_C(X) X##ULL
+#endif
+
#if !defined(UINT_LEAST32_C) && defined(UINT32_C)
# define UINT_LEAST32_C(X) UINT32_C(X)
+#elif !defined(UINT_LEAST32_C)
+# define UINT_LEAST32_C(X) X##UL
#endif
-#if !defined(UINT_LEAST64_C) && defined(UINT64_C)
-# define UINT_LEAST64_C(X) UINT64_C(X)
+#if !defined(UINT_LEAST16_C) && defined(UINT16_C)
+# define UINT_LEAST16_C(X) UINT16_C(X)
+#elif !defined(UINT_LEAST16_C)
+# define UINT_LEAST16_C(X) X##U
#endif
#if defined(__GNUC__)
@@ -19,6 +29,13 @@
# define HIDDEN
#endif
+#define A 10
+#define B 11
+#define C 12
+#define D 13
+#define E 14
+#define F 15
+
HIDDEN size_t libblake_internal_blakes_update(struct libblake_blakes_state *state, const unsigned char *data, size_t len);
HIDDEN size_t libblake_internal_blakeb_update(struct libblake_blakeb_state *state, const unsigned char *data, size_t len);
@@ -29,3 +46,9 @@ HIDDEN void libblake_internal_blakeb_digest(struct libblake_blakeb_state *state,
HIDDEN void libblake_internal_blake2s_compress(struct libblake_blake2s_state *state, const unsigned char *data);
HIDDEN void libblake_internal_blake2b_compress(struct libblake_blake2b_state *state, const unsigned char *data);
+
+HIDDEN void libblake_internal_blake2xs_init0(struct libblake_blake2xs_state *state, const struct libblake_blake2xs_params *params);
+HIDDEN void libblake_internal_blake2xb_init0(struct libblake_blake2xb_state *state, const struct libblake_blake2xb_params *params);
+
+HIDDEN void libblake_internal_blake2s_output_digest(struct libblake_blake2s_state *state, size_t output_len, unsigned char *output);
+HIDDEN void libblake_internal_blake2b_output_digest(struct libblake_blake2b_state *state, size_t output_len, unsigned char *output);