diff options
Diffstat (limited to 'ext/hash')
-rw-r--r-- | ext/hash/murmur/PMurHash128.c | 10 | ||||
-rw-r--r-- | ext/hash/php_hash_fnv.h | 4 | ||||
-rw-r--r-- | ext/hash/php_hash_gost.h | 2 | ||||
-rw-r--r-- | ext/hash/php_hash_joaat.h | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/ext/hash/murmur/PMurHash128.c b/ext/hash/murmur/PMurHash128.c index 2856542190..4425f81575 100644 --- a/ext/hash/murmur/PMurHash128.c +++ b/ext/hash/murmur/PMurHash128.c @@ -170,7 +170,7 @@ do {\ } 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]; @@ -240,7 +240,7 @@ skiprot: /* 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]; @@ -480,8 +480,8 @@ do {\ } 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]; @@ -523,7 +523,7 @@ void PMurHash128x64_Result(const uint64_t * const ph, const uint64_t * const pca /* 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]; diff --git a/ext/hash/php_hash_fnv.h b/ext/hash/php_hash_fnv.h index f4dacb223e..728b1f125e 100644 --- a/ext/hash/php_hash_fnv.h +++ b/ext/hash/php_hash_fnv.h @@ -55,12 +55,12 @@ typedef struct { 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); diff --git a/ext/hash/php_hash_gost.h b/ext/hash/php_hash_gost.h index 850b089506..a69dcc45eb 100644 --- a/ext/hash/php_hash_gost.h +++ b/ext/hash/php_hash_gost.h @@ -31,6 +31,6 @@ typedef struct { 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 diff --git a/ext/hash/php_hash_joaat.h b/ext/hash/php_hash_joaat.h index 113983c2a4..3dd2caa50c 100644 --- a/ext/hash/php_hash_joaat.h +++ b/ext/hash/php_hash_joaat.h @@ -24,7 +24,7 @@ typedef struct { 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); |