php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
hash_xxhash.c File Reference
#include "php_hash.h"
#include "php_hash_xxhash.h"

Go to the source code of this file.

Typedefs

typedef XXH_errorcode(* xxh3_reset_with_secret_func_t) (XXH3_state_t *, const void *, size_t)
 
typedef XXH_errorcode(* xxh3_reset_with_seed_func_t) (XXH3_state_t *, XXH64_hash_t)
 

Functions

PHP_HASH_API void PHP_XXH32Init (PHP_XXH32_CTX *ctx, HashTable *args)
 
PHP_HASH_API void PHP_XXH32Update (PHP_XXH32_CTX *ctx, const unsigned char *in, size_t len)
 
PHP_HASH_API void PHP_XXH32Final (unsigned char digest[4], PHP_XXH32_CTX *ctx)
 
PHP_HASH_API zend_result PHP_XXH32Copy (const php_hash_ops *ops, const PHP_XXH32_CTX *orig_context, PHP_XXH32_CTX *copy_context)
 
PHP_HASH_API void PHP_XXH64Init (PHP_XXH64_CTX *ctx, HashTable *args)
 
PHP_HASH_API void PHP_XXH64Update (PHP_XXH64_CTX *ctx, const unsigned char *in, size_t len)
 
PHP_HASH_API void PHP_XXH64Final (unsigned char digest[8], PHP_XXH64_CTX *ctx)
 
PHP_HASH_API zend_result PHP_XXH64Copy (const php_hash_ops *ops, const PHP_XXH64_CTX *orig_context, PHP_XXH64_CTX *copy_context)
 
PHP_HASH_API void PHP_XXH3_64_Init (PHP_XXH3_64_CTX *ctx, HashTable *args)
 
PHP_HASH_API void PHP_XXH3_64_Update (PHP_XXH3_64_CTX *ctx, const unsigned char *in, size_t len)
 
PHP_HASH_API void PHP_XXH3_64_Final (unsigned char digest[8], PHP_XXH3_64_CTX *ctx)
 
PHP_HASH_API zend_result PHP_XXH3_64_Copy (const php_hash_ops *ops, const PHP_XXH3_64_CTX *orig_context, PHP_XXH3_64_CTX *copy_context)
 
PHP_HASH_API void PHP_XXH3_128_Init (PHP_XXH3_128_CTX *ctx, HashTable *args)
 
PHP_HASH_API void PHP_XXH3_128_Update (PHP_XXH3_128_CTX *ctx, const unsigned char *in, size_t len)
 
PHP_HASH_API void PHP_XXH3_128_Final (unsigned char digest[16], PHP_XXH3_128_CTX *ctx)
 
PHP_HASH_API zend_result PHP_XXH3_128_Copy (const php_hash_ops *ops, const PHP_XXH3_128_CTX *orig_context, PHP_XXH3_128_CTX *copy_context)
 

Variables

const php_hash_ops php_hash_xxh32_ops
 
const php_hash_ops php_hash_xxh64_ops
 
const php_hash_ops php_hash_xxh3_64_ops
 
const php_hash_ops php_hash_xxh3_128_ops
 

Typedef Documentation

◆ xxh3_reset_with_secret_func_t

typedef XXH_errorcode(* xxh3_reset_with_secret_func_t) (XXH3_state_t *, const void *, size_t)

Definition at line 158 of file hash_xxhash.c.

◆ xxh3_reset_with_seed_func_t

typedef XXH_errorcode(* xxh3_reset_with_seed_func_t) (XXH3_state_t *, XXH64_hash_t)

Definition at line 159 of file hash_xxhash.c.

Function Documentation

◆ PHP_XXH32Copy()

PHP_HASH_API zend_result PHP_XXH32Copy ( const php_hash_ops * ops,
const PHP_XXH32_CTX * orig_context,
PHP_XXH32_CTX * copy_context )

Definition at line 72 of file hash_xxhash.c.

◆ PHP_XXH32Final()

PHP_HASH_API void PHP_XXH32Final ( unsigned char digest[4],
PHP_XXH32_CTX * ctx )

Definition at line 67 of file hash_xxhash.c.

◆ PHP_XXH32Init()

PHP_HASH_API void PHP_XXH32Init ( PHP_XXH32_CTX * ctx,
HashTable * args )

Definition at line 40 of file hash_xxhash.c.

◆ PHP_XXH32Update()

PHP_HASH_API void PHP_XXH32Update ( PHP_XXH32_CTX * ctx,
const unsigned char * in,
size_t len )

Definition at line 62 of file hash_xxhash.c.

◆ PHP_XXH3_128_Copy()

PHP_HASH_API zend_result PHP_XXH3_128_Copy ( const php_hash_ops * ops,
const PHP_XXH3_128_CTX * orig_context,
PHP_XXH3_128_CTX * copy_context )

Definition at line 278 of file hash_xxhash.c.

◆ PHP_XXH3_128_Final()

PHP_HASH_API void PHP_XXH3_128_Final ( unsigned char digest[16],
PHP_XXH3_128_CTX * ctx )

Definition at line 273 of file hash_xxhash.c.

◆ PHP_XXH3_128_Init()

PHP_HASH_API void PHP_XXH3_128_Init ( PHP_XXH3_128_CTX * ctx,
HashTable * args )

Definition at line 263 of file hash_xxhash.c.

◆ PHP_XXH3_128_Update()

PHP_HASH_API void PHP_XXH3_128_Update ( PHP_XXH3_128_CTX * ctx,
const unsigned char * in,
size_t len )

Definition at line 268 of file hash_xxhash.c.

◆ PHP_XXH3_64_Copy()

PHP_HASH_API zend_result PHP_XXH3_64_Copy ( const php_hash_ops * ops,
const PHP_XXH3_64_CTX * orig_context,
PHP_XXH3_64_CTX * copy_context )

Definition at line 228 of file hash_xxhash.c.

◆ PHP_XXH3_64_Final()

PHP_HASH_API void PHP_XXH3_64_Final ( unsigned char digest[8],
PHP_XXH3_64_CTX * ctx )

Definition at line 223 of file hash_xxhash.c.

◆ PHP_XXH3_64_Init()

PHP_HASH_API void PHP_XXH3_64_Init ( PHP_XXH3_64_CTX * ctx,
HashTable * args )

Definition at line 213 of file hash_xxhash.c.

◆ PHP_XXH3_64_Update()

PHP_HASH_API void PHP_XXH3_64_Update ( PHP_XXH3_64_CTX * ctx,
const unsigned char * in,
size_t len )

Definition at line 218 of file hash_xxhash.c.

◆ PHP_XXH64Copy()

PHP_HASH_API zend_result PHP_XXH64Copy ( const php_hash_ops * ops,
const PHP_XXH64_CTX * orig_context,
PHP_XXH64_CTX * copy_context )

Definition at line 137 of file hash_xxhash.c.

◆ PHP_XXH64Final()

PHP_HASH_API void PHP_XXH64Final ( unsigned char digest[8],
PHP_XXH64_CTX * ctx )

Definition at line 132 of file hash_xxhash.c.

◆ PHP_XXH64Init()

PHP_HASH_API void PHP_XXH64Init ( PHP_XXH64_CTX * ctx,
HashTable * args )

Definition at line 107 of file hash_xxhash.c.

◆ PHP_XXH64Update()

PHP_HASH_API void PHP_XXH64Update ( PHP_XXH64_CTX * ctx,
const unsigned char * in,
size_t len )

Definition at line 127 of file hash_xxhash.c.

Variable Documentation

◆ php_hash_xxh32_ops

const php_hash_ops php_hash_xxh32_ops
Initial value:
= {
"xxh32",
php_hash_xxh32_unserialize,
4,
4,
sizeof(PHP_XXH32_CTX),
0
}
PHP_HASH_API zend_result php_hash_serialize(const php_hashcontext_object *hash, zend_long *magic, zval *zv)
Definition hash.c:334
PHP_HASH_API zend_result PHP_XXH32Copy(const php_hash_ops *ops, const PHP_XXH32_CTX *orig_context, PHP_XXH32_CTX *copy_context)
Definition hash_xxhash.c:72
PHP_HASH_API void PHP_XXH32Init(PHP_XXH32_CTX *ctx, HashTable *args)
Definition hash_xxhash.c:40
PHP_HASH_API void PHP_XXH32Update(PHP_XXH32_CTX *ctx, const unsigned char *in, size_t len)
Definition hash_xxhash.c:62
PHP_HASH_API void PHP_XXH32Final(unsigned char digest[4], PHP_XXH32_CTX *ctx)
Definition hash_xxhash.c:67
void(* php_hash_final_func_t)(unsigned char *digest, void *context)
Definition php_hash.h:36
zend_result(* php_hash_copy_func_t)(const void *ops, const void *orig_context, void *dest_context)
Definition php_hash.h:37
void(* php_hash_init_func_t)(void *context, HashTable *args)
Definition php_hash.h:34
void(* php_hash_update_func_t)(void *context, const unsigned char *buf, size_t count)
Definition php_hash.h:35
#define PHP_XXH32_SPEC

Definition at line 25 of file hash_xxhash.c.

◆ php_hash_xxh3_128_ops

const php_hash_ops php_hash_xxh3_128_ops
Initial value:
= {
"xxh128",
16,
8,
0
}
#define NULL
Definition gdcache.h:45
PHP_HASH_API int php_hash_unserialize(php_hashcontext_object *hash, zend_long magic, const zval *zv)
Definition hash.c:345
PHP_HASH_API void PHP_XXH3_128_Init(PHP_XXH3_128_CTX *ctx, HashTable *args)
PHP_HASH_API void PHP_XXH3_128_Update(PHP_XXH3_128_CTX *ctx, const unsigned char *in, size_t len)
PHP_HASH_API zend_result PHP_XXH3_128_Copy(const php_hash_ops *ops, const PHP_XXH3_128_CTX *orig_context, PHP_XXH3_128_CTX *copy_context)
PHP_HASH_API void PHP_XXH3_128_Final(unsigned char digest[16], PHP_XXH3_128_CTX *ctx)
PHP_XXH3_CTX PHP_XXH3_128_CTX

Definition at line 248 of file hash_xxhash.c.

◆ php_hash_xxh3_64_ops

const php_hash_ops php_hash_xxh3_64_ops
Initial value:
= {
"xxh3",
8,
8,
sizeof(PHP_XXH3_64_CTX),
0
}
PHP_HASH_API void PHP_XXH3_64_Update(PHP_XXH3_64_CTX *ctx, const unsigned char *in, size_t len)
PHP_HASH_API zend_result PHP_XXH3_64_Copy(const php_hash_ops *ops, const PHP_XXH3_64_CTX *orig_context, PHP_XXH3_64_CTX *copy_context)
PHP_HASH_API void PHP_XXH3_64_Init(PHP_XXH3_64_CTX *ctx, HashTable *args)
PHP_HASH_API void PHP_XXH3_64_Final(unsigned char digest[8], PHP_XXH3_64_CTX *ctx)
PHP_XXH3_CTX PHP_XXH3_64_CTX

Definition at line 143 of file hash_xxhash.c.

◆ php_hash_xxh64_ops

const php_hash_ops php_hash_xxh64_ops
Initial value:
= {
"xxh64",
php_hash_xxh64_unserialize,
8,
8,
sizeof(PHP_XXH64_CTX),
0
}
PHP_HASH_API void PHP_XXH64Init(PHP_XXH64_CTX *ctx, HashTable *args)
PHP_HASH_API void PHP_XXH64Update(PHP_XXH64_CTX *ctx, const unsigned char *in, size_t len)
PHP_HASH_API zend_result PHP_XXH64Copy(const php_hash_ops *ops, const PHP_XXH64_CTX *orig_context, PHP_XXH64_CTX *copy_context)
PHP_HASH_API void PHP_XXH64Final(unsigned char digest[8], PHP_XXH64_CTX *ctx)
#define PHP_XXH64_SPEC

Definition at line 92 of file hash_xxhash.c.