95 context->state = fnv_32_buf((
void *)input, inputLen,
context->state, 0);
101 context->state = fnv_32_buf((
void *)input, inputLen,
context->state, 1);
106#ifdef WORDS_BIGENDIAN
110 unsigned char *c = (
unsigned char *) &
context->state;
112 for (i = 0; i < 4; i++) {
113 digest[i] = c[3 - i];
130 context->state = fnv_64_buf((
void *)input, inputLen,
context->state, 0);
136 context->state = fnv_64_buf((
void *)input, inputLen,
context->state, 1);
141#ifdef WORDS_BIGENDIAN
145 unsigned char *c = (
unsigned char *) &
context->state;
147 for (i = 0; i < 8; i++) {
148 digest[i] = c[7 - i];
167fnv_32_buf(
void *
buf,
size_t len, uint32_t hval,
int alternate)
169 unsigned char *
bp = (
unsigned char *)
buf;
170 unsigned char *be =
bp +
len;
175 if (alternate == 0) {
181 hval ^= (uint32_t)*
bp++;
186 hval ^= (uint32_t)*
bp++;
210fnv_64_buf(
void *
buf,
size_t len, uint64_t hval,
int alternate)
212 unsigned char *
bp = (
unsigned char *)
buf;
213 unsigned char *be =
bp +
len;
219 if (alternate == 0) {
225 hval ^= (uint64_t)*
bp++;
230 hval ^= (uint64_t)*
bp++;
zend_ffi_ctype_name_buf buf
PHP_HASH_API zend_result php_hash_serialize(const php_hashcontext_object *hash, zend_long *magic, zval *zv)
PHP_HASH_API zend_result php_hash_copy(const void *ops, const void *orig_context, void *dest_context)
PHP_HASH_API int php_hash_unserialize(php_hashcontext_object *hash, zend_long magic, const zval *zv)
const php_hash_ops php_hash_fnv1a32_ops
PHP_HASH_API void PHP_FNV1a64Update(PHP_FNV164_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)
const php_hash_ops php_hash_fnv1a64_ops
PHP_HASH_API void PHP_FNV132Init(PHP_FNV132_CTX *context, ZEND_ATTRIBUTE_UNUSED HashTable *args)
PHP_HASH_API void PHP_FNV164Init(PHP_FNV164_CTX *context, ZEND_ATTRIBUTE_UNUSED HashTable *args)
const php_hash_ops php_hash_fnv132_ops
PHP_HASH_API void PHP_FNV132Update(PHP_FNV132_CTX *context, const unsigned char *input, size_t inputLen)
PHP_HASH_API void PHP_FNV164Update(PHP_FNV164_CTX *context, const unsigned char *input, size_t inputLen)
PHP_HASH_API void PHP_FNV164Final(unsigned char digest[8], PHP_FNV164_CTX *context)
PHP_HASH_API void PHP_FNV132Final(unsigned char digest[4], PHP_FNV132_CTX *context)
const php_hash_ops php_hash_fnv164_ops
void(* php_hash_final_func_t)(unsigned char *digest, void *context)
void(* php_hash_init_func_t)(void *context, HashTable *args)
void(* php_hash_update_func_t)(void *context, const unsigned char *buf, size_t count)
struct _php_hash_ops php_hash_ops
HashTable bp[PHPDBG_BREAK_TABLES]
#define ZEND_ATTRIBUTE_UNUSED
struct _zend_array HashTable