Lines Matching refs:ctx

40 PHP_HASH_API void PHP_XXH32Init(PHP_XXH32_CTX *ctx, HashTable *args)  in PHP_XXH32Init()  argument
43 memset(&ctx->s, 0, sizeof ctx->s); in PHP_XXH32Init()
50 XXH32_reset(&ctx->s, (XXH32_hash_t)Z_LVAL_P(seed)); in PHP_XXH32Init()
52 XXH32_reset(&ctx->s, 0); in PHP_XXH32Init()
55 XXH32_reset(&ctx->s, 0); in PHP_XXH32Init()
59 PHP_HASH_API void PHP_XXH32Update(PHP_XXH32_CTX *ctx, const unsigned char *in, size_t len) in PHP_XXH32Update() argument
61 XXH32_update(&ctx->s, in, len); in PHP_XXH32Update()
64 PHP_HASH_API void PHP_XXH32Final(unsigned char digest[4], PHP_XXH32_CTX *ctx) in PHP_XXH32Final() argument
66 XXH32_canonicalFromHash((XXH32_canonical_t*)digest, XXH32_digest(&ctx->s)); in PHP_XXH32Final()
78 PHP_XXH32_CTX *ctx = (PHP_XXH32_CTX *) hash->context; in php_hash_xxh32_unserialize() local
82 && ctx->s.memsize < 16) { in php_hash_xxh32_unserialize()
104 PHP_HASH_API void PHP_XXH64Init(PHP_XXH64_CTX *ctx, HashTable *args) in PHP_XXH64Init() argument
107 memset(&ctx->s, 0, sizeof ctx->s); in PHP_XXH64Init()
114 XXH64_reset(&ctx->s, (XXH64_hash_t)Z_LVAL_P(seed)); in PHP_XXH64Init()
116 XXH64_reset(&ctx->s, 0); in PHP_XXH64Init()
119 XXH64_reset(&ctx->s, 0); in PHP_XXH64Init()
123 PHP_HASH_API void PHP_XXH64Update(PHP_XXH64_CTX *ctx, const unsigned char *in, size_t len) in PHP_XXH64Update() argument
125 XXH64_update(&ctx->s, in, len); in PHP_XXH64Update()
128 PHP_HASH_API void PHP_XXH64Final(unsigned char digest[8], PHP_XXH64_CTX *ctx) in PHP_XXH64Final() argument
130 XXH64_canonicalFromHash((XXH64_canonical_t*)digest, XXH64_digest(&ctx->s)); in PHP_XXH64Final()
157 zend_always_inline static void _PHP_XXH3_Init(PHP_XXH3_64_CTX *ctx, HashTable *args, in _PHP_XXH3_Init() argument
160 memset(&ctx->s, 0, sizeof ctx->s); in _PHP_XXH3_Init()
174 func_init_seed(&ctx->s, (XXH64_hash_t)Z_LVAL_P(_seed)); in _PHP_XXH3_Init()
188 if (len > sizeof(ctx->secret)) { in _PHP_XXH3_Init()
189 len = sizeof(ctx->secret); in _PHP_XXH3_Init()
190 …LL, E_WARNING, "%s: Secret content exceeding %zu bytes discarded", algo_name, sizeof(ctx->secret)); in _PHP_XXH3_Init()
192 memcpy((unsigned char *)ctx->secret, ZSTR_VAL(secret_string), len); in _PHP_XXH3_Init()
194 func_init_secret(&ctx->s, ctx->secret, len); in _PHP_XXH3_Init()
199 func_init_seed(&ctx->s, 0); in _PHP_XXH3_Init()
202 PHP_HASH_API void PHP_XXH3_64_Init(PHP_XXH3_64_CTX *ctx, HashTable *args) in PHP_XXH3_64_Init() argument
204 _PHP_XXH3_Init(ctx, args, XXH3_64bits_reset_withSeed, XXH3_64bits_reset_withSecret, "xxh3"); in PHP_XXH3_64_Init()
207 PHP_HASH_API void PHP_XXH3_64_Update(PHP_XXH3_64_CTX *ctx, const unsigned char *in, size_t len) in PHP_XXH3_64_Update() argument
209 XXH3_64bits_update(&ctx->s, in, len); in PHP_XXH3_64_Update()
212 PHP_HASH_API void PHP_XXH3_64_Final(unsigned char digest[8], PHP_XXH3_64_CTX *ctx) in PHP_XXH3_64_Final() argument
214 XXH64_canonicalFromHash((XXH64_canonical_t*)digest, XXH3_64bits_digest(&ctx->s)); in PHP_XXH3_64_Final()
226 PHP_XXH64_CTX *ctx = (PHP_XXH64_CTX *) hash->context; in php_hash_xxh64_unserialize() local
230 && ctx->s.memsize < 32) { in php_hash_xxh64_unserialize()
252 PHP_HASH_API void PHP_XXH3_128_Init(PHP_XXH3_128_CTX *ctx, HashTable *args) in PHP_XXH3_128_Init() argument
254 _PHP_XXH3_Init(ctx, args, XXH3_128bits_reset_withSeed, XXH3_128bits_reset_withSecret, "xxh128"); in PHP_XXH3_128_Init()
257 PHP_HASH_API void PHP_XXH3_128_Update(PHP_XXH3_128_CTX *ctx, const unsigned char *in, size_t len) in PHP_XXH3_128_Update() argument
259 XXH3_128bits_update(&ctx->s, in, len); in PHP_XXH3_128_Update()
262 PHP_HASH_API void PHP_XXH3_128_Final(unsigned char digest[16], PHP_XXH3_128_CTX *ctx) in PHP_XXH3_128_Final() argument
264 XXH128_canonicalFromHash((XXH128_canonical_t*)digest, XXH3_128bits_digest(&ctx->s)); in PHP_XXH3_128_Final()