Lines Matching refs:ctx
39 PHP_HASH_API void PHP_MURMUR3AInit(PHP_MURMUR3A_CTX *ctx, HashTable *args) in PHP_MURMUR3AInit() argument
46 ctx->h = (uint32_t)Z_LVAL_P(seed); in PHP_MURMUR3AInit()
48 ctx->h = 0; in PHP_MURMUR3AInit()
51 ctx->h = 0; in PHP_MURMUR3AInit()
53 ctx->carry = 0; in PHP_MURMUR3AInit()
54 ctx->len = 0; in PHP_MURMUR3AInit()
57 PHP_HASH_API void PHP_MURMUR3AUpdate(PHP_MURMUR3A_CTX *ctx, const unsigned char *in, size_t len) in PHP_MURMUR3AUpdate() argument
59 ctx->len += len; in PHP_MURMUR3AUpdate()
60 PMurHash32_Process(&ctx->h, &ctx->carry, in, len); in PHP_MURMUR3AUpdate()
63 PHP_HASH_API void PHP_MURMUR3AFinal(unsigned char digest[4], PHP_MURMUR3A_CTX *ctx) in PHP_MURMUR3AFinal() argument
65 ctx->h = PMurHash32_Result(ctx->h, ctx->carry, ctx->len); in PHP_MURMUR3AFinal()
67 digest[0] = (unsigned char)((ctx->h >> 24) & 0xff); in PHP_MURMUR3AFinal()
68 digest[1] = (unsigned char)((ctx->h >> 16) & 0xff); in PHP_MURMUR3AFinal()
69 digest[2] = (unsigned char)((ctx->h >> 8) & 0xff); in PHP_MURMUR3AFinal()
70 digest[3] = (unsigned char)(ctx->h & 0xff); in PHP_MURMUR3AFinal()
96 PHP_HASH_API void PHP_MURMUR3CInit(PHP_MURMUR3C_CTX *ctx, HashTable *args) in PHP_MURMUR3CInit() argument
104 ctx->h[0] = _seed; in PHP_MURMUR3CInit()
105 ctx->h[1] = _seed; in PHP_MURMUR3CInit()
106 ctx->h[2] = _seed; in PHP_MURMUR3CInit()
107 ctx->h[3] = _seed; in PHP_MURMUR3CInit()
109 memset(&ctx->h, 0, sizeof ctx->h); in PHP_MURMUR3CInit()
112 memset(&ctx->h, 0, sizeof ctx->h); in PHP_MURMUR3CInit()
114 memset(&ctx->carry, 0, sizeof ctx->carry); in PHP_MURMUR3CInit()
115 ctx->len = 0; in PHP_MURMUR3CInit()
118 PHP_HASH_API void PHP_MURMUR3CUpdate(PHP_MURMUR3C_CTX *ctx, const unsigned char *in, size_t len) in PHP_MURMUR3CUpdate() argument
120 ctx->len += len; in PHP_MURMUR3CUpdate()
121 PMurHash128x86_Process(ctx->h, ctx->carry, in, len); in PHP_MURMUR3CUpdate()
124 PHP_HASH_API void PHP_MURMUR3CFinal(unsigned char digest[16], PHP_MURMUR3C_CTX *ctx) in PHP_MURMUR3CFinal() argument
127 PMurHash128x86_Result(ctx->h, ctx->carry, ctx->len, h); in PHP_MURMUR3CFinal()
170 PHP_HASH_API void PHP_MURMUR3FInit(PHP_MURMUR3F_CTX *ctx, HashTable *args) in PHP_MURMUR3FInit() argument
178 ctx->h[0] = _seed; in PHP_MURMUR3FInit()
179 ctx->h[1] = _seed; in PHP_MURMUR3FInit()
181 memset(&ctx->h, 0, sizeof ctx->h); in PHP_MURMUR3FInit()
184 memset(&ctx->h, 0, sizeof ctx->h); in PHP_MURMUR3FInit()
186 memset(&ctx->carry, 0, sizeof ctx->carry); in PHP_MURMUR3FInit()
187 ctx->len = 0; in PHP_MURMUR3FInit()
190 PHP_HASH_API void PHP_MURMUR3FUpdate(PHP_MURMUR3F_CTX *ctx, const unsigned char *in, size_t len) in PHP_MURMUR3FUpdate() argument
192 ctx->len += len; in PHP_MURMUR3FUpdate()
193 PMurHash128x64_Process(ctx->h, ctx->carry, in, len); in PHP_MURMUR3FUpdate()
196 PHP_HASH_API void PHP_MURMUR3FFinal(unsigned char digest[16], PHP_MURMUR3F_CTX *ctx) in PHP_MURMUR3FFinal() argument
199 PMurHash128x64_Result(ctx->h, ctx->carry, ctx->len, h); in PHP_MURMUR3FFinal()