diff options
Diffstat (limited to '')
-rw-r--r-- | common.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/common.h b/common.h new file mode 100644 index 0000000..6ebab6f --- /dev/null +++ b/common.h @@ -0,0 +1,28 @@ +/* See LICENSE file for copyright and license details. */ +#include "libblake.h" + +#include <ctype.h> +#include <inttypes.h> +#include <string.h> + +#if !defined(UINT_LEAST32_C) && defined(UINT32_C) +# define UINT_LEAST32_C(X) UINT32_C(X) +#endif + +#if !defined(UINT_LEAST64_C) && defined(UINT64_C) +# define UINT_LEAST64_C(X) UINT64_C(X) +#endif + +#if defined(__GNUC__) +# define HIDDEN __attribute__((__visibility__("hidden"))) +#else +# define HIDDEN +#endif + +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); + +HIDDEN void libblake_internal_blakes_digest(struct libblake_blakes_state *state, unsigned char *data, size_t len, + size_t bits, const char *suffix, unsigned char *output, size_t words_out); +HIDDEN void libblake_internal_blakeb_digest(struct libblake_blakeb_state *state, unsigned char *data, size_t len, + size_t bits, const char *suffix, unsigned char *output, size_t words_out); |