Server IP : 172.67.216.182 / Your IP : 172.71.82.27 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/php/82/src/ext/hash/ |
Upload File : |
/* +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | https://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | [email protected] so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Anatol Belski <[email protected]> | +----------------------------------------------------------------------+ */ #ifndef PHP_HASH_XXHASH_H #define PHP_HASH_XXHASH_H #define XXH_INLINE_ALL 1 #include "xxhash.h" typedef struct { XXH32_state_t s; } PHP_XXH32_CTX; #define PHP_XXH32_SPEC "llllllllllll" 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 int PHP_XXH32Copy(const php_hash_ops *ops, PHP_XXH32_CTX *orig_context, PHP_XXH32_CTX *copy_context); typedef struct { XXH64_state_t s; } PHP_XXH64_CTX; #define PHP_XXH64_SPEC "qqqqqqqqqllq" 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 int PHP_XXH64Copy(const php_hash_ops *ops, PHP_XXH64_CTX *orig_context, PHP_XXH64_CTX *copy_context); #define PHP_XXH3_SECRET_SIZE_MIN XXH3_SECRET_SIZE_MIN #define PHP_XXH3_SECRET_SIZE_MAX 256 typedef struct { XXH3_state_t s; /* The value must survive the whole streaming cycle from init to final. A more flexible mechanism would be to carry zend_string* passed through the options. However, that will require to introduce a destructor handler for ctx, so then it wolud be automatically called from the object destructor. Until that is given, the viable way is to use a plausible max secret length. */ const unsigned char secret[PHP_XXH3_SECRET_SIZE_MAX]; } PHP_XXH3_CTX; typedef PHP_XXH3_CTX PHP_XXH3_64_CTX; 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 int PHP_XXH3_64_Copy(const php_hash_ops *ops, PHP_XXH3_64_CTX *orig_context, PHP_XXH3_64_CTX *copy_context); typedef PHP_XXH3_CTX PHP_XXH3_128_CTX; 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 int PHP_XXH3_128_Copy(const php_hash_ops *ops, PHP_XXH3_128_CTX *orig_context, PHP_XXH3_128_CTX *copy_context); #endif /* PHP_HASH_XXHASH_H */