} while(0)
/* Finalize a hash. To match the original Murmur3_128x86 the total_length must be provided */
-void PMurHash128x86_Result(const uint32_t *ph, const uint32_t *pcarry, uint32_t total_length, uint32_t *out)
+void PMurHash128x86_Result(const uint32_t ph[4], const uint32_t pcarry[4], uint32_t total_length, uint32_t out[4])
{
uint32_t h1 = ph[0];
uint32_t h2 = ph[1];
/* Main hashing function. Initialise carry[4] to {0,0,0,0} and h[4] to an initial {seed,seed,seed,seed}
* if wanted. Both ph and pcarry are required arguments. */
-void PMurHash128x86_Process(uint32_t * const ph, uint32_t * const pcarry, const void * const key, int len)
+void PMurHash128x86_Process(uint32_t ph[4], uint32_t pcarry[4], const void * const key, int len)
{
uint32_t h1 = ph[0];
uint32_t h2 = ph[1];
} while(0)
/* Finalize a hash. To match the original Murmur3_128x64 the total_length must be provided */
-void PMurHash128x64_Result(const uint64_t * const ph, const uint64_t * const pcarry,
- const uint32_t total_length, uint64_t * const out)
+void PMurHash128x64_Result(const uint64_t ph[2], const uint64_t pcarry[2],
+ const uint32_t total_length, uint64_t out[2])
{
uint64_t h1 = ph[0];
uint64_t h2 = ph[1];
/* Main hashing function. Initialise carry[2] to {0,0} and h[2] to an initial {seed,seed}
* if wanted. Both ph and pcarry are required arguments. */
-void PMurHash128x64_Process(uint64_t * const ph, uint64_t * const pcarry, const void * const key, int len)
+void PMurHash128x64_Process(uint64_t ph[2], uint64_t pcarry[2], const void * const key, int len)
{
uint64_t h1 = ph[0];
uint64_t h2 = ph[1];
PHP_HASH_API void PHP_FNV132Init(PHP_FNV132_CTX *context, ZEND_ATTRIBUTE_UNUSED HashTable *args);
PHP_HASH_API void PHP_FNV132Update(PHP_FNV132_CTX *context, const unsigned char *input, size_t inputLen);
PHP_HASH_API void PHP_FNV1a32Update(PHP_FNV132_CTX *context, const unsigned char *input, size_t inputLen);
-PHP_HASH_API void PHP_FNV132Final(unsigned char digest[16], PHP_FNV132_CTX * context);
+PHP_HASH_API void PHP_FNV132Final(unsigned char digest[4], PHP_FNV132_CTX * context);
PHP_HASH_API void PHP_FNV164Init(PHP_FNV164_CTX *context, ZEND_ATTRIBUTE_UNUSED HashTable *args);
PHP_HASH_API void PHP_FNV164Update(PHP_FNV164_CTX *context, const unsigned char *input, size_t inputLen);
PHP_HASH_API void PHP_FNV1a64Update(PHP_FNV164_CTX *context, const unsigned char *input, size_t inputLen);
-PHP_HASH_API void PHP_FNV164Final(unsigned char digest[16], PHP_FNV164_CTX * context);
+PHP_HASH_API void PHP_FNV164Final(unsigned char digest[8], PHP_FNV164_CTX * context);
static uint32_t fnv_32_buf(void *buf, size_t len, uint32_t hval, int alternate);
static uint64_t fnv_64_buf(void *buf, size_t len, uint64_t hval, int alternate);
PHP_HASH_API void PHP_GOSTInit(PHP_GOST_CTX *, ZEND_ATTRIBUTE_UNUSED HashTable *args);
PHP_HASH_API void PHP_GOSTUpdate(PHP_GOST_CTX *, const unsigned char *, size_t);
-PHP_HASH_API void PHP_GOSTFinal(unsigned char[64], PHP_GOST_CTX *);
+PHP_HASH_API void PHP_GOSTFinal(unsigned char[32], PHP_GOST_CTX *);
#endif
PHP_HASH_API void PHP_JOAATInit(PHP_JOAAT_CTX *context, ZEND_ATTRIBUTE_UNUSED HashTable *args);
PHP_HASH_API void PHP_JOAATUpdate(PHP_JOAAT_CTX *context, const unsigned char *input, size_t inputLen);
-PHP_HASH_API void PHP_JOAATFinal(unsigned char digest[16], PHP_JOAAT_CTX * context);
+PHP_HASH_API void PHP_JOAATFinal(unsigned char digest[4], PHP_JOAAT_CTX * context);
static uint32_t joaat_buf(void *buf, size_t len, uint32_t hval);