Home
last modified time | relevance | path

Searched refs:context (Results 1 – 25 of 465) sorted by relevance

12345678910>>...19

/php-src/ext/hash/
H A Dhash_tiger.c139 context->buffer[context->length++] = 0x1; in TigerFinalize()
141 memset(&context->buffer[context->length], 0, 8-context->length%8); in TigerFinalize()
142 context->length += 8-context->length%8; in TigerFinalize()
146 memset(&context->buffer[context->length], 0, 64 - context->length); in TigerFinalize()
147 tiger_compress(context->passes, ((uint64_t *) context->buffer), context->state); in TigerFinalize()
150 memset(&context->buffer[context->length], 0, 56 - context->length); in TigerFinalize()
165 tiger_compress(context->passes, ((uint64_t *) context->buffer), context->state); in TigerFinalize()
179 memset(context, 0, sizeof(*context)); in PHP_3TIGERInit()
187 memset(context, 0, sizeof(*context)); in PHP_4TIGERInit()
225 ZEND_SECURE_ZERO(context, sizeof(*context)); in PHP_TIGER128Final()
[all …]
H A Dhash_sha.c145 context->count[0] = context->count[1] = 0; in PHP_SHA256InitArgs()
223 context->count[0] = context->count[1] = 0; in PHP_SHA224InitArgs()
262 SHA256Transform(context->state, context->buffer); in PHP_SHA224Update()
311 ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); in PHP_SHA224Final()
340 SHA256Transform(context->state, context->buffer); in PHP_SHA256Update()
474 context->count[0] = context->count[1] = 0; in PHP_SHA384InitArgs()
556 SHA512Transform(context->state, context->buffer); in PHP_SHA384Update()
635 context->count[0] = context->count[1] = 0; in PHP_SHA512InitArgs()
654 context->count[0] = context->count[1] = 0; in PHP_SHA512_256InitArgs()
672 context->count[0] = context->count[1] = 0; in PHP_SHA512_224InitArgs()
[all …]
H A Dhash_haval.c257 { int i; context->count[0] = context->count[1] = 0; \
259 context->passes = p; context->output = b; \
300 context->Transform(context->state, context->buffer); in PHP_HAVALUpdate()
303 context->Transform(context->state, &input[i]); in PHP_HAVALUpdate()
343 context->state[3] += (context->state[7] & 0xFF000000) | in PHP_HAVAL128Final()
396 context->state[4] += ((context->state[7] & 0xFE000000) | in PHP_HAVAL160Final()
449 context->state[5] += ((context->state[7] & 0xFC000000) | (context->state[6] & 0x03E00000)) >> 21; in PHP_HAVAL192Final()
450 context->state[4] += ((context->state[7] & 0x03E00000) | (context->state[6] & 0x001F0000)) >> 16; in PHP_HAVAL192Final()
451 context->state[3] += ((context->state[7] & 0x001F0000) | (context->state[6] & 0x0000FC00)) >> 10; in PHP_HAVAL192Final()
452 context->state[2] += ((context->state[7] & 0x0000FC00) | (context->state[6] & 0x000003E0)) >> 5; in PHP_HAVAL192Final()
[all …]
H A Dhash_crc32.c25 context->state = ~0; in PHP_CRC32Init()
37 context->state = (context->state << 8) ^ crc32_table[(context->state >> 24) ^ (input[i] & 0xff)]; in PHP_CRC32Update()
50 context->state = (context->state >> 8) ^ crc32b_table[(context->state ^ input[i]) & 0xff]; in PHP_CRC32BUpdate()
63 context->state = (context->state >> 8) ^ crc32c_table[(context->state ^ input[i]) & 0xff]; in PHP_CRC32CUpdate()
69 context->state=~context->state; in PHP_CRC32LEFinal()
72 digest[1] = (unsigned char) ((context->state >> 8) & 0xff); in PHP_CRC32LEFinal()
73 digest[0] = (unsigned char) (context->state & 0xff); in PHP_CRC32LEFinal()
74 context->state = 0; in PHP_CRC32LEFinal()
79 context->state=~context->state; in PHP_CRC32BEFinal()
83 digest[3] = (unsigned char) (context->state & 0xff); in PHP_CRC32BEFinal()
[all …]
H A Dhash_snefru.c133 memset(context, 0, sizeof(*context)); in PHP_SNEFRUInit()
141 context->count[0]++; in PHP_SNEFRUUpdate()
142 context->count[1] = MAX32 - context->count[1]; in PHP_SNEFRUUpdate()
143 context->count[1] = ((uint32_t) len * 8) - context->count[1]; in PHP_SNEFRUUpdate()
149 memcpy(&context->buffer[context->length], input, len); in PHP_SNEFRUUpdate()
156 memcpy(&context->buffer[context->length], input, i); in PHP_SNEFRUUpdate()
157 SnefruTransform(context, context->buffer); in PHP_SNEFRUUpdate()
175 SnefruTransform(context, context->buffer); in PHP_SNEFRUFinal()
178 context->state[14] = context->count[0]; in PHP_SNEFRUFinal()
179 context->state[15] = context->count[1]; in PHP_SNEFRUFinal()
[all …]
H A Dhash_md.c190 context->count[0] = context->count[1] = 0; in PHP_MD4InitArgs()
225 MD4Transform(context->state, context->buffer); in PHP_MD4Update()
267 ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); in PHP_MD4Final()
302 context->state[32+i] = (context->state[16+i] ^ context->state[i]); in MD2_Transform()
307 t = context->state[j] = context->state[j] ^ MD2_S[t]; in MD2_Transform()
326 memcpy(context->buffer + context->in_buffer, p, len); in PHP_MD2Update()
331 memcpy(context->buffer + context->in_buffer, p, 16 - context->in_buffer); in PHP_MD2Update()
332 MD2_Transform(context, context->buffer); in PHP_MD2Update()
352 memset(context->buffer + context->in_buffer, 16 - context->in_buffer, 16 - context->in_buffer); in PHP_MD2Final()
353 MD2_Transform(context, context->buffer); in PHP_MD2Final()
[all …]
H A Dhash_ripemd.c89 context->count[0] = context->count[1] = 0; in PHP_RIPEMD128Init()
104 context->count[0] = context->count[1] = 0; in PHP_RIPEMD256Init()
123 context->count[0] = context->count[1] = 0; in PHP_RIPEMD160Init()
139 context->count[0] = context->count[1] = 0; in PHP_RIPEMD320Init()
292 RIPEMD128Transform(context->state, context->buffer); in PHP_RIPEMD128Update()
391 RIPEMD256Transform(context->state, context->buffer); in PHP_RIPEMD256Update()
491 RIPEMD160Transform(context->state, context->buffer); in PHP_RIPEMD160Update()
600 RIPEMD320Transform(context->state, context->buffer); in PHP_RIPEMD320Update()
673 ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); in PHP_RIPEMD128Final()
710 ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); in PHP_RIPEMD256Final()
[all …]
H A Dhash_fnv.c88 context->state = PHP_FNV1_32_INIT; in PHP_FNV132Init()
95 context->state = fnv_32_buf((void *)input, inputLen, context->state, 0); in PHP_FNV132Update()
101 context->state = fnv_32_buf((void *)input, inputLen, context->state, 1); in PHP_FNV1a32Update()
104 PHP_HASH_API void PHP_FNV132Final(unsigned char digest[4], PHP_FNV132_CTX * context) in PHP_FNV132Final() argument
107 memcpy(digest, &context->state, 4); in PHP_FNV132Final()
110 unsigned char *c = (unsigned char *) &context->state; in PHP_FNV132Final()
123 context->state = PHP_FNV1_64_INIT; in PHP_FNV164Init()
130 context->state = fnv_64_buf((void *)input, inputLen, context->state, 0); in PHP_FNV164Update()
136 context->state = fnv_64_buf((void *)input, inputLen, context->state, 1); in PHP_FNV1a64Update()
142 memcpy(digest, &context->state, 8); in PHP_FNV164Final()
[all …]
H A Dhash_adler32.c21 PHP_HASH_API void PHP_ADLER32Init(PHP_ADLER32_CTX *context, ZEND_ATTRIBUTE_UNUSED HashTable *args) in PHP_ADLER32Init() argument
23 context->state = 1; in PHP_ADLER32Init()
30 s[0] = context->state & 0xffff; in PHP_ADLER32Update()
31 s[1] = (context->state >> 16) & 0xffff; in PHP_ADLER32Update()
43 context->state = s[0] + (s[1] << 16); in PHP_ADLER32Update()
46 PHP_HASH_API void PHP_ADLER32Final(unsigned char digest[4], PHP_ADLER32_CTX *context) in PHP_ADLER32Final() argument
48 digest[0] = (unsigned char) ((context->state >> 24) & 0xff); in PHP_ADLER32Final()
49 digest[1] = (unsigned char) ((context->state >> 16) & 0xff); in PHP_ADLER32Final()
50 digest[2] = (unsigned char) ((context->state >> 8) & 0xff); in PHP_ADLER32Final()
51 digest[3] = (unsigned char) (context->state & 0xff); in PHP_ADLER32Final()
[all …]
H A Dhash_whirlpool.c268 memset(context, 0, sizeof(*context)); in PHP_WHIRLPOOLInit()
281 int bufferPos = context->buffer.pos; in PHP_WHIRLPOOLUpdate()
314 WhirlpoolTransform(context); in PHP_WHIRLPOOLUpdate()
360 WhirlpoolTransform(context); in PHP_WHIRLPOOLUpdate()
369 context->buffer.bits = bufferBits; in PHP_WHIRLPOOLUpdate()
370 context->buffer.pos = bufferPos; in PHP_WHIRLPOOLUpdate()
378 int bufferBits = context->buffer.bits; in PHP_WHIRLPOOLFinal()
379 int bufferPos = context->buffer.pos; in PHP_WHIRLPOOLFinal()
396 WhirlpoolTransform(context); in PHP_WHIRLPOOLFinal()
413 WhirlpoolTransform(context); in PHP_WHIRLPOOLFinal()
[all …]
H A Dhash_gost.c240 memset(context, 0, sizeof(*context)); in PHP_GOSTInit()
256 context->count[0] = MAX32 - context->count[0]; in PHP_GOSTUpdate()
257 context->count[0] = (len * 8) - context->count[0]; in PHP_GOSTUpdate()
263 memcpy(&context->buffer[context->length], input, len); in PHP_GOSTUpdate()
270 memcpy(&context->buffer[context->length], input, i); in PHP_GOSTUpdate()
271 GostTransform(context, context->buffer); in PHP_GOSTUpdate()
289 GostTransform(context, context->buffer); in PHP_GOSTFinal()
292 memcpy(l, context->count, sizeof(context->count)); in PHP_GOSTFinal()
293 Gost(context, l); in PHP_GOSTFinal()
295 Gost(context, l); in PHP_GOSTFinal()
[all …]
H A Dhash_joaat.c39 PHP_HASH_API void PHP_JOAATInit(PHP_JOAAT_CTX *context, ZEND_ATTRIBUTE_UNUSED HashTable *args) in PHP_JOAATInit() argument
41 context->state = 0; in PHP_JOAATInit()
44 PHP_HASH_API void PHP_JOAATUpdate(PHP_JOAAT_CTX *context, const unsigned char *input, size_t inputL… in PHP_JOAATUpdate() argument
46 context->state = joaat_buf((void *)input, inputLen, context->state); in PHP_JOAATUpdate()
49 PHP_HASH_API void PHP_JOAATFinal(unsigned char digest[4], PHP_JOAAT_CTX * context) in PHP_JOAATFinal() argument
51 uint32_t hval = context->state; in PHP_JOAATFinal()
66 context->state = 0; in PHP_JOAATFinal()
H A Dphp_hash_fnv.h53 PHP_HASH_API void PHP_FNV132Init(PHP_FNV132_CTX *context, ZEND_ATTRIBUTE_UNUSED HashTable *args);
54 PHP_HASH_API void PHP_FNV132Update(PHP_FNV132_CTX *context, const unsigned char *input, size_t inpu…
55 PHP_HASH_API void PHP_FNV1a32Update(PHP_FNV132_CTX *context, const unsigned char *input, size_t inp…
56 PHP_HASH_API void PHP_FNV132Final(unsigned char digest[4], PHP_FNV132_CTX * context);
58 PHP_HASH_API void PHP_FNV164Init(PHP_FNV164_CTX *context, ZEND_ATTRIBUTE_UNUSED HashTable *args);
59 PHP_HASH_API void PHP_FNV164Update(PHP_FNV164_CTX *context, const unsigned char *input, size_t inpu…
60 PHP_HASH_API void PHP_FNV1a64Update(PHP_FNV164_CTX *context, const unsigned char *input, size_t inp…
61 PHP_HASH_API void PHP_FNV164Final(unsigned char digest[8], PHP_FNV164_CTX * context);
H A Dphp_hash_tiger.h30 PHP_HASH_API void PHP_3TIGERInit(PHP_TIGER_CTX *context, ZEND_ATTRIBUTE_UNUSED HashTable *args);
31 PHP_HASH_API void PHP_4TIGERInit(PHP_TIGER_CTX *context, ZEND_ATTRIBUTE_UNUSED HashTable *args);
32 PHP_HASH_API void PHP_TIGERUpdate(PHP_TIGER_CTX *context, const unsigned char *input, size_t len);
33 PHP_HASH_API void PHP_TIGER128Final(unsigned char digest[16], PHP_TIGER_CTX *context);
34 PHP_HASH_API void PHP_TIGER160Final(unsigned char digest[20], PHP_TIGER_CTX *context);
35 PHP_HASH_API void PHP_TIGER192Final(unsigned char digest[24], PHP_TIGER_CTX *context);
H A Dphp_hash_crc32.h27 PHP_HASH_API void PHP_CRC32Init(PHP_CRC32_CTX *context, ZEND_ATTRIBUTE_UNUSED HashTable *args);
28 PHP_HASH_API void PHP_CRC32Update(PHP_CRC32_CTX *context, const unsigned char *input, size_t len);
29 PHP_HASH_API void PHP_CRC32BUpdate(PHP_CRC32_CTX *context, const unsigned char *input, size_t len);
30 PHP_HASH_API void PHP_CRC32CUpdate(PHP_CRC32_CTX *context, const unsigned char *input, size_t len);
31 PHP_HASH_API void PHP_CRC32LEFinal(unsigned char digest[4], PHP_CRC32_CTX *context);
32 PHP_HASH_API void PHP_CRC32BEFinal(unsigned char digest[4], PHP_CRC32_CTX *context);
/php-src/main/streams/
H A Dphp_stream_context.h37 #define php_stream_context_to_zval(context, zval) { ZVAL_RES(zval, (context)->res); GC_ADDREF((cont… argument
89 #define php_stream_notify_info(context, code, xmsg, xcode) do { if ((context) && (context)->notifie… argument
93 #define php_stream_notify_progress(context, bsofar, bmax) do { if ((context) && (context)->notifier… argument
97 #define php_stream_notify_completed(context) do { if ((context) && (context)->notifier) { \ argument
99 NULL, 0, (context)->notifier->progress, (context)->notifier->progress_max, NULL); } } while(0)
101 #define php_stream_notify_progress_init(context, sofar, bmax) do { if ((context) && (context)->noti… argument
102 (context)->notifier->progress = (sofar); \
107 … php_stream_notify_progress_increment(context, dsofar, dmax) do { if ((context) && (context)->noti… argument
110 …php_stream_notify_progress((context), (context)->notifier->progress, (context)->notifier->progress…
112 #define php_stream_notify_file_size(context, file_size, xmsg, xcode) do { if ((context) && (context argument
[all …]
/php-src/ext/standard/tests/
H A Dgh10885.phpt2 GH-10885: stream_socket_server context leaks
5 $context = stream_context_create();
6 debug_zval_dump($context);
12 $context,
14 debug_zval_dump($context);
17 debug_zval_dump($context);
20 resource(%d) of type (stream-context) refcount(2)
21 resource(%d) of type (stream-context) refcount(3)
22 resource(%d) of type (stream-context) refcount(2)
/php-src/Zend/
H A Dzend_system_id.c26 static PHP_MD5_CTX context; variable
32 PHP_MD5Update(&context, module_name, strlen(module_name)); in zend_add_system_entropy()
33 PHP_MD5Update(&context, hook_name, strlen(hook_name)); in zend_add_system_entropy()
35 PHP_MD5Update(&context, data, size); in zend_add_system_entropy()
46 PHP_MD5Init(&context); in zend_startup_system_id()
47 PHP_MD5Update(&context, PHP_VERSION, sizeof(PHP_VERSION)-1); in zend_startup_system_id()
52 PHP_MD5Update(&context, __DATE__, sizeof(__DATE__)-1); in zend_startup_system_id()
53 PHP_MD5Update(&context, __TIME__, sizeof(__TIME__)-1); in zend_startup_system_id()
84 PHP_MD5Update(&context, &hooks, sizeof hooks); in zend_finalize_system_id()
88 PHP_MD5Update(&context, &i, sizeof i); in zend_finalize_system_id()
[all …]
H A Dzend_fibers.h62 zend_fiber_context *context; member
74 typedef void (*zend_fiber_clean)(zend_fiber_context *context);
110 zend_fiber_context context; member
140 ZEND_API zend_result zend_fiber_init_context(zend_fiber_context *context, void *kind, zend_fiber_co…
141 ZEND_API void zend_fiber_destroy_context(zend_fiber_context *context);
154 static zend_always_inline zend_fiber *zend_fiber_from_context(zend_fiber_context *context) in END_EXTERN_C()
156 ZEND_ASSERT(context->kind == zend_ce_fiber && "Fiber context does not belong to a Zend fiber"); in END_EXTERN_C()
158 return (zend_fiber *)(((char *) context) - XtOffsetOf(zend_fiber, context)); in END_EXTERN_C()
163 return &fiber->context; in zend_fiber_get_context()
/php-src/main/
H A Doutput.c259 if (context.out.data && context.out.used) { in php_output_flush()
796 if (context->in.free && context->in.data) { in php_output_context_feed()
813 context->in.data = context->out.data; in php_output_context_swap()
814 context->in.used = context->out.used; in php_output_context_swap()
815 context->in.free = context->out.free; in php_output_context_swap()
816 context->in.size = context->out.size; in php_output_context_swap()
828 context->out.data = context->in.data; in php_output_context_pass()
829 context->out.used = context->in.used; in php_output_context_pass()
830 context->out.size = context->in.size; in php_output_context_pass()
831 context->out.free = context->in.free; in php_output_context_pass()
[all …]
/php-src/ext/phar/tests/
H A Dfgc_edgecases.phpt29 $context = stream_context_create();
31 file_get_contents("./hi", 0, $context, 0, -1);
38 echo file_get_contents("./hi", 0, $context);
40 echo file_get_contents("./hi", 0, $context, 50000);
42 echo file_get_contents("./hi", 0, $context, 0, 0);
57 $context = stream_context_create();
66 echo file_get_contents("./hi", 0, $context);
77 $context = stream_context_create();
86 echo file_get_contents("./hi", 0, $context);
98 $context = stream_context_create();
[all …]
/php-src/ext/fileinfo/
H A Dfileinfo.stub.php72 * @param resource|null $context
76 …public function file(string $filename, int $flags = FILEINFO_NONE, $context = null): string|false … argument
79 * @param resource|null $context
83 …public function buffer(string $string, int $flags = FILEINFO_NONE, $context = null): string|false … argument
100 * @param resource|null $context
103 function finfo_file(finfo $finfo, string $filename, int $flags = FILEINFO_NONE, $context = null): s… argument
106 * @param resource|null $context
109 function finfo_buffer(finfo $finfo, string $string, int $flags = FILEINFO_NONE, $context = null): s… argument
/php-src/ext/sodium/tests/
H A Dcrypto_kdf.phpt9 $subkey = sodium_crypto_kdf_derive_from_key(10, 0, "context!", $key);
14 $subkey = sodium_crypto_kdf_derive_from_key(100, 0, "context!", $key);
19 $subkey = sodium_crypto_kdf_derive_from_key(SODIUM_CRYPTO_KDF_BYTES_MAX, 0, "context", $key);
24 $subkey = sodium_crypto_kdf_derive_from_key(SODIUM_CRYPTO_KDF_BYTES_MAX, -1, "context!", $key);
29 …$subkey = sodium_crypto_kdf_derive_from_key(SODIUM_CRYPTO_KDF_BYTES_MAX, 0, "context!", "short key…
34 $subkey1 = sodium_crypto_kdf_derive_from_key(SODIUM_CRYPTO_KDF_BYTES_MIN, 0, "context!", $key);
35 $subkey2 = sodium_crypto_kdf_derive_from_key(SODIUM_CRYPTO_KDF_BYTES_MIN, 1, "context!", $key);
37 $subkey4 = sodium_crypto_kdf_derive_from_key(SODIUM_CRYPTO_KDF_BYTES_MIN, 0, "context!", $key);
/php-src/ext/standard/
H A Dsha1.c34 PHP_SHA1_CTX context; in PHP_FUNCTION() local
43 PHP_SHA1Init(&context); in PHP_FUNCTION()
45 PHP_SHA1Final(digest, &context); in PHP_FUNCTION()
66 PHP_SHA1_CTX context; in PHP_FUNCTION() local
81 PHP_SHA1Init(&context); in PHP_FUNCTION()
87 PHP_SHA1Final(digest, &context); in PHP_FUNCTION()
157 context->count[0] = context->count[1] = 0; in PHP_SHA1InitArgs()
160 context->state[0] = 0x67452301; in PHP_SHA1InitArgs()
185 context->count[1]++; in PHP_SHA1Update()
195 SHA1Transform(context->state, context->buffer); in PHP_SHA1Update()
[all …]
/php-src/ext/dom/parentnode/
H A Dtree.c589 xmlNode *parentNode = dom_object_get_node(context); in dom_parent_node_append()
591 php_libxml_invalidate_node_list_cache(context->document); in dom_parent_node_append()
600 php_dom_node_append(context->document, node, parentNode); in dom_parent_node_append()
606 xmlNode *parentNode = dom_object_get_node(context); in dom_parent_node_prepend()
609 dom_parent_node_append(context, nodes, nodesc); in dom_parent_node_prepend()
636 xmlNode *thisp = dom_object_get_node(context); in dom_parent_node_after()
668 xmlNode *thisp = dom_object_get_node(context); in dom_parent_node_before()
716 void dom_child_node_remove(dom_object *context) in dom_child_node_remove() argument
718 xmlNode *child = dom_object_get_node(context); in dom_child_node_remove()
736 xmlNodePtr child = dom_object_get_node(context); in dom_child_replace_with()
[all …]

Completed in 47 milliseconds

12345678910>>...19