46#ifndef HASHX_BLOCK_MODE
47#define HASHX_INPUT uint64_t input
49#define HASHX_INPUT const void* input, size_t size
61typedef enum hashx_type {
62 HASHX_TYPE_INTERPRETED = 1,
68typedef enum hashx_result {
70 HASHX_FAIL_UNPREPARED,
76#if defined(_WIN32) || defined(__CYGWIN__)
83 #define HASHX_API __declspec(dllexport)
84 #elif !defined(HASHX_STATIC)
85 #define HASHX_API __declspec(dllimport)
92 #define HASHX_API __attribute__ ((visibility ("default")))
94 #define HASHX_API __attribute__ ((visibility ("hidden")))
96 #define HASHX_PRIVATE __attribute__ ((visibility ("hidden")))
111HASHX_API
hashx_ctx* hashx_alloc(hashx_type type);
129HASHX_API hashx_result hashx_make(
hashx_ctx* ctx,
130 const void* seed,
size_t size);
146HASHX_API hashx_result hashx_query_type(
hashx_ctx* ctx, hashx_type *type_out);
160HASHX_API hashx_result hashx_exec(
const hashx_ctx* ctx,
161 HASHX_INPUT,
void* output);
170HASHX_API
void hashx_free(
hashx_ctx* ctx);
172#ifdef HASHX_RNG_CALLBACK
186HASHX_API
void hashx_rng_callback(
hashx_ctx* ctx,
187 void (*callback)(uint64_t*,
void*),