/PHP-7.1/ext/hash/ |
H A D | hash_tiger.c | 143 context->buffer[context->length++] = 0x1; in TigerFinalize() 145 memset(&context->buffer[context->length], 0, 8-context->length%8); in TigerFinalize() 146 context->length += 8-context->length%8; in TigerFinalize() 150 memset(&context->buffer[context->length], 0, 64 - context->length); in TigerFinalize() 151 tiger_compress(context->passes, ((uint64_t *) context->buffer), context->state); in TigerFinalize() 154 memset(&context->buffer[context->length], 0, 56 - context->length); in TigerFinalize() 169 tiger_compress(context->passes, ((uint64_t *) context->buffer), context->state); in TigerFinalize() 183 memset(context, 0, sizeof(*context)); in PHP_3TIGERInit() 191 memset(context, 0, sizeof(*context)); in PHP_4TIGERInit() 229 ZEND_SECURE_ZERO(context, sizeof(*context)); in PHP_TIGER128Final() [all …]
|
H A D | hash_haval.c | 260 { int i; context->count[0] = context->count[1] = 0; \ 262 context->passes = p; context->output = b; \ 303 context->Transform(context->state, context->buffer); in PHP_HAVALUpdate() 306 context->Transform(context->state, &input[i]); in PHP_HAVALUpdate() 347 context->state[3] += (context->state[7] & 0xFF000000) | in PHP_HAVAL128Final() 401 context->state[4] += ((context->state[7] & 0xFE000000) | in PHP_HAVAL160Final() 455 context->state[5] += ((context->state[7] & 0xFC000000) | (context->state[6] & 0x03E00000)) >> 21; in PHP_HAVAL192Final() 456 context->state[4] += ((context->state[7] & 0x03E00000) | (context->state[6] & 0x001F0000)) >> 16; in PHP_HAVAL192Final() 457 context->state[3] += ((context->state[7] & 0x001F0000) | (context->state[6] & 0x0000FC00)) >> 10; in PHP_HAVAL192Final() 458 context->state[2] += ((context->state[7] & 0x0000FC00) | (context->state[6] & 0x000003E0)) >> 5; in PHP_HAVAL192Final() [all …]
|
H A D | hash_crc32.c | 26 PHP_HASH_API void PHP_CRC32Init(PHP_CRC32_CTX *context) in PHP_CRC32Init() argument 28 context->state = ~0; in PHP_CRC32Init() 36 context->state = (context->state << 8) ^ crc32_table[(context->state >> 24) ^ (input[i] & 0xff)]; in PHP_CRC32Update() 45 context->state = (context->state >> 8) ^ crc32b_table[(context->state ^ input[i]) & 0xff]; in PHP_CRC32BUpdate() 51 context->state=~context->state; in PHP_CRC32Final() 54 digest[1] = (unsigned char) ((context->state >> 8) & 0xff); in PHP_CRC32Final() 55 digest[0] = (unsigned char) (context->state & 0xff); in PHP_CRC32Final() 56 context->state = 0; in PHP_CRC32Final() 61 context->state=~context->state; in PHP_CRC32BFinal() 65 digest[3] = (unsigned char) (context->state & 0xff); in PHP_CRC32BFinal() [all …]
|
H A D | hash_sha.c | 208 context->count[0] = context->count[1] = 0; in PHP_SHA1Init() 354 SHA1Transform(context->state, context->buffer); in PHP_SHA1Update() 463 context->count[0] = context->count[1] = 0; in PHP_SHA256Init() 523 context->count[0] = context->count[1] = 0; in PHP_SHA224Init() 561 SHA256Transform(context->state, context->buffer); in PHP_SHA224Update() 638 SHA256Transform(context->state, context->buffer); in PHP_SHA256Update() 772 context->count[0] = context->count[1] = 0; in PHP_SHA384Init() 852 SHA512Transform(context->state, context->buffer); in PHP_SHA384Update() 928 context->count[0] = context->count[1] = 0; in PHP_SHA512Init() 947 context->count[0] = context->count[1] = 0; in PHP_SHA512_256Init() [all …]
|
H A D | hash_snefru.c | 137 memset(context, 0, sizeof(*context)); in PHP_SNEFRUInit() 145 context->count[0]++; in PHP_SNEFRUUpdate() 146 context->count[1] = MAX32 - context->count[1]; in PHP_SNEFRUUpdate() 147 context->count[1] = (len * 8) - context->count[1]; in PHP_SNEFRUUpdate() 153 memcpy(&context->buffer[context->length], input, len); in PHP_SNEFRUUpdate() 160 memcpy(&context->buffer[context->length], input, i); in PHP_SNEFRUUpdate() 161 SnefruTransform(context, context->buffer); in PHP_SNEFRUUpdate() 179 SnefruTransform(context, context->buffer); in PHP_SNEFRUFinal() 182 context->state[14] = context->count[0]; in PHP_SNEFRUFinal() 183 context->state[15] = context->count[1]; in PHP_SNEFRUFinal() [all …]
|
H A D | hash_fnv.c | 70 PHP_HASH_API void PHP_FNV132Init(PHP_FNV132_CTX *context) in PHP_FNV132Init() argument 72 context->state = PHP_FNV1_32_INIT; in PHP_FNV132Init() 79 context->state = fnv_32_buf((void *)input, inputLen, context->state, 0); in PHP_FNV132Update() 85 context->state = fnv_32_buf((void *)input, inputLen, context->state, 1); in PHP_FNV1a32Update() 91 memcpy(digest, &context->state, 4); in PHP_FNV132Final() 94 unsigned char *c = (unsigned char *) &context->state; in PHP_FNV132Final() 107 context->state = PHP_FNV1_64_INIT; in PHP_FNV164Init() 114 context->state = fnv_64_buf((void *)input, inputLen, context->state, 0); in PHP_FNV164Update() 120 context->state = fnv_64_buf((void *)input, inputLen, context->state, 1); in PHP_FNV1a64Update() 126 memcpy(digest, &context->state, 8); in PHP_FNV164Final() [all …]
|
H A D | hash_ripemd.c | 73 context->count[0] = context->count[1] = 0; in PHP_RIPEMD128Init() 88 context->count[0] = context->count[1] = 0; in PHP_RIPEMD256Init() 107 context->count[0] = context->count[1] = 0; in PHP_RIPEMD160Init() 123 context->count[0] = context->count[1] = 0; in PHP_RIPEMD320Init() 275 RIPEMD128Transform(context->state, context->buffer); in PHP_RIPEMD128Update() 373 RIPEMD256Transform(context->state, context->buffer); in PHP_RIPEMD256Update() 472 RIPEMD160Transform(context->state, context->buffer); in PHP_RIPEMD160Update() 580 RIPEMD320Transform(context->state, context->buffer); in PHP_RIPEMD320Update() 653 ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); in PHP_RIPEMD128Final() 690 ZEND_SECURE_ZERO((unsigned char*) context, sizeof(*context)); in PHP_RIPEMD256Final() [all …]
|
H A D | hash_adler32.c | 25 PHP_HASH_API void PHP_ADLER32Init(PHP_ADLER32_CTX *context) in PHP_ADLER32Init() argument 27 context->state = 1; in PHP_ADLER32Init() 34 s[0] = context->state & 0xffff; in PHP_ADLER32Update() 35 s[1] = (context->state >> 16) & 0xffff; in PHP_ADLER32Update() 47 context->state = s[0] + (s[1] << 16); in PHP_ADLER32Update() 50 PHP_HASH_API void PHP_ADLER32Final(unsigned char digest[4], PHP_ADLER32_CTX *context) in PHP_ADLER32Final() argument 52 digest[0] = (unsigned char) ((context->state >> 24) & 0xff); in PHP_ADLER32Final() 53 digest[1] = (unsigned char) ((context->state >> 16) & 0xff); in PHP_ADLER32Final() 54 digest[2] = (unsigned char) ((context->state >> 8) & 0xff); in PHP_ADLER32Final() 55 digest[3] = (unsigned char) (context->state & 0xff); in PHP_ADLER32Final() [all …]
|
H A D | hash_whirlpool.c | 272 memset(context, 0, sizeof(*context)); in PHP_WHIRLPOOLInit() 285 int bufferPos = context->buffer.pos; in PHP_WHIRLPOOLUpdate() 318 WhirlpoolTransform(context); in PHP_WHIRLPOOLUpdate() 364 WhirlpoolTransform(context); in PHP_WHIRLPOOLUpdate() 373 context->buffer.bits = bufferBits; in PHP_WHIRLPOOLUpdate() 374 context->buffer.pos = bufferPos; in PHP_WHIRLPOOLUpdate() 382 int bufferBits = context->buffer.bits; in PHP_WHIRLPOOLFinal() 383 int bufferPos = context->buffer.pos; in PHP_WHIRLPOOLFinal() 400 WhirlpoolTransform(context); in PHP_WHIRLPOOLFinal() 417 WhirlpoolTransform(context); in PHP_WHIRLPOOLFinal() [all …]
|
H A D | hash_md.c | 269 context->count[0] = context->count[1] = 0; in PHP_MD5Init() 305 MD5Transform(context->state, context->buffer); in PHP_MD5Update() 529 context->count[0] = context->count[1] = 0; in PHP_MD4Init() 563 MD4Transform(context->state, context->buffer); in PHP_MD4Update() 640 context->state[32+i] = (context->state[16+i] ^ context->state[i]); in MD2_Transform() 645 t = context->state[j] = context->state[j] ^ MD2_S[t]; in MD2_Transform() 669 memcpy(context->buffer + context->in_buffer, p, 16 - context->in_buffer); in PHP_MD2Update() 670 MD2_Transform(context, context->buffer); in PHP_MD2Update() 690 memset(context->buffer + context->in_buffer, 16 - context->in_buffer, 16 - context->in_buffer); in PHP_MD2Final() 691 MD2_Transform(context, context->buffer); in PHP_MD2Final() [all …]
|
H A D | hash_gost.c | 244 memset(context, 0, sizeof(*context)); in PHP_GOSTInit() 260 context->count[0] = MAX32 - context->count[0]; in PHP_GOSTUpdate() 261 context->count[0] = (len * 8) - context->count[0]; in PHP_GOSTUpdate() 267 memcpy(&context->buffer[context->length], input, len); in PHP_GOSTUpdate() 274 memcpy(&context->buffer[context->length], input, i); in PHP_GOSTUpdate() 275 GostTransform(context, context->buffer); in PHP_GOSTUpdate() 293 GostTransform(context, context->buffer); in PHP_GOSTFinal() 296 memcpy(l, context->count, sizeof(context->count)); in PHP_GOSTFinal() 297 Gost(context, l); in PHP_GOSTFinal() 299 Gost(context, l); in PHP_GOSTFinal() [all …]
|
H A D | hash_joaat.c | 38 PHP_HASH_API void PHP_JOAATInit(PHP_JOAAT_CTX *context) in PHP_JOAATInit() argument 40 context->state = 0; in PHP_JOAATInit() 43 PHP_HASH_API void PHP_JOAATUpdate(PHP_JOAAT_CTX *context, const unsigned char *input, unsigned int … in PHP_JOAATUpdate() argument 45 context->state = joaat_buf((void *)input, inputLen, context->state); in PHP_JOAATUpdate() 48 PHP_HASH_API void PHP_JOAATFinal(unsigned char digest[4], PHP_JOAAT_CTX * context) in PHP_JOAATFinal() argument 51 memcpy(digest, &context->state, 4); in PHP_JOAATFinal() 54 unsigned char *c = (unsigned char *) &context->state; in PHP_JOAATFinal() 60 context->state = 0; in PHP_JOAATFinal()
|
H A D | hash.c | 120 void *context; in php_hash_do_hash() local 161 efree(context); in php_hash_do_hash() 238 void *context; in php_hash_do_hash_hmac() local 291 efree(context); in php_hash_do_hash_hmac() 334 void *context; in PHP_FUNCTION() local 360 hash->context = context; in PHP_FUNCTION() 554 void *context; in PHP_FUNCTION() local 577 copy_hash->context = context; in PHP_FUNCTION() 628 void *context; in PHP_FUNCTION() local 709 efree(context); in PHP_FUNCTION() [all …]
|
H A D | php_hash_fnv.h | 57 PHP_HASH_API void PHP_FNV132Init(PHP_FNV132_CTX *context); 58 PHP_HASH_API void PHP_FNV132Update(PHP_FNV132_CTX *context, const unsigned char *input, unsigned in… 59 PHP_HASH_API void PHP_FNV1a32Update(PHP_FNV132_CTX *context, const unsigned char *input, unsigned i… 60 PHP_HASH_API void PHP_FNV132Final(unsigned char digest[16], PHP_FNV132_CTX * context); 62 PHP_HASH_API void PHP_FNV164Init(PHP_FNV164_CTX *context); 63 PHP_HASH_API void PHP_FNV164Update(PHP_FNV164_CTX *context, const unsigned char *input, unsigned in… 64 PHP_HASH_API void PHP_FNV1a64Update(PHP_FNV164_CTX *context, const unsigned char *input, unsigned i… 65 PHP_HASH_API void PHP_FNV164Final(unsigned char digest[16], PHP_FNV164_CTX * context);
|
H A D | php_hash_tiger.h | 33 PHP_HASH_API void PHP_3TIGERInit(PHP_TIGER_CTX *context); 34 PHP_HASH_API void PHP_4TIGERInit(PHP_TIGER_CTX *context); 35 PHP_HASH_API void PHP_TIGERUpdate(PHP_TIGER_CTX *context, const unsigned char *input, size_t len); 36 PHP_HASH_API void PHP_TIGER128Final(unsigned char digest[16], PHP_TIGER_CTX *context); 37 PHP_HASH_API void PHP_TIGER160Final(unsigned char digest[20], PHP_TIGER_CTX *context); 38 PHP_HASH_API void PHP_TIGER192Final(unsigned char digest[24], PHP_TIGER_CTX *context);
|
H A D | php_hash_crc32.h | 30 PHP_HASH_API void PHP_CRC32Init(PHP_CRC32_CTX *context); 31 PHP_HASH_API void PHP_CRC32Update(PHP_CRC32_CTX *context, const unsigned char *input, size_t len); 32 PHP_HASH_API void PHP_CRC32BUpdate(PHP_CRC32_CTX *context, const unsigned char *input, size_t len); 33 PHP_HASH_API void PHP_CRC32Final(unsigned char digest[4], PHP_CRC32_CTX *context);
|
/PHP-7.1/main/streams/ |
H A D | php_stream_context.h | 41 #define php_stream_context_to_zval(context, zval) { ZVAL_RES(zval, (context)->res); GC_REFCOUNT((co… argument 93 #define php_stream_notify_info(context, code, xmsg, xcode) do { if ((context) && (context)->notifie… argument 97 #define php_stream_notify_progress(context, bsofar, bmax) do { if ((context) && (context)->notifier… argument 101 #define php_stream_notify_progress_init(context, sofar, bmax) do { if ((context) && (context)->noti… argument 102 (context)->notifier->progress = (sofar); \ 103 (context)->notifier->progress_max = (bmax); \ 107 … php_stream_notify_progress_increment(context, dsofar, dmax) do { if ((context) && (context)->noti… argument 108 (context)->notifier->progress += (dsofar); \ 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-7.1/main/ |
H A D | output.c | 276 if (context.out.data && context.out.used) { in php_output_flush() 803 if (context->in.free && context->in.data) { in php_output_context_feed() 820 context->in.data = context->out.data; in php_output_context_swap() 821 context->in.used = context->out.used; in php_output_context_swap() 822 context->in.free = context->out.free; in php_output_context_swap() 823 context->in.size = context->out.size; in php_output_context_swap() 835 context->out.data = context->in.data; in php_output_context_pass() 836 context->out.used = context->in.used; in php_output_context_pass() 837 context->out.size = context->in.size; in php_output_context_pass() 838 context->out.free = context->in.free; in php_output_context_pass() [all …]
|
/PHP-7.1/ext/phar/tests/ |
H A D | fgc_edgecases.phpt | 28 $context = stream_context_create(); 29 file_get_contents("./hi", 0, $context, 0, -1); 33 echo file_get_contents("./hi", 0, $context); 54 $context = stream_context_create(); 55 file_get_contents("./hi", 0, $context, 0, -1); 59 echo file_get_contents("./hi", 0, $context); 71 $context = stream_context_create(); 72 file_get_contents("./hi", 0, $context, 0, -1); 76 echo file_get_contents("./hi", 0, $context); 88 $context = stream_context_create(); [all …]
|
/PHP-7.1/ext/mysqlnd/ |
H A D | mysqlnd_commands.c | 36 } context; member 58 } context; member 170 } context; member 304 } context; member 375 } context; member 450 } context; member 513 } context; member 575 } context; member 629 } context; member 689 } context; member [all …]
|
/PHP-7.1/ext/standard/ |
H A D | sha1.c | 40 PHP_SHA1_CTX context; in PHP_FUNCTION() local 48 PHP_SHA1Init(&context); in PHP_FUNCTION() 50 PHP_SHA1Final(digest, &context); in PHP_FUNCTION() 73 PHP_SHA1_CTX context; in PHP_FUNCTION() local 86 PHP_SHA1Init(&context); in PHP_FUNCTION() 92 PHP_SHA1Final(digest, &context); in PHP_FUNCTION() 162 context->count[0] = context->count[1] = 0; in PHP_SHA1Init() 165 context->state[0] = 0x67452301; in PHP_SHA1Init() 189 context->count[1]++; in PHP_SHA1Update() 199 SHA1Transform(context->state, context->buffer); in PHP_SHA1Update() [all …]
|
H A D | streamsfuncs.c | 194 if (context) { in PHP_FUNCTION() 891 if (context->notifier) { in parse_context_params() 920 if (context == NULL) { in decode_context_param() 927 if (context == NULL) { in decode_context_param() 938 return context; in decode_context_param() 954 if (!context) { in PHP_FUNCTION() 1021 if (!context) { in PHP_FUNCTION() 1042 if (!context) { in PHP_FUNCTION() 1048 …if (context->notifier && Z_TYPE(context->notifier->ptr) != IS_UNDEF && context->notifier->func == … in PHP_FUNCTION() 1050 if (Z_REFCOUNTED(context->notifier->ptr)) Z_ADDREF(context->notifier->ptr); in PHP_FUNCTION() [all …]
|
H A D | http_fopen_wrapper.c | 160 if (!context || in php_stream_url_wrap_http_ex() 190 if (context && in php_stream_url_wrap_http_ex() 240 if (!context || (tmpzval = php_stream_context_get_option(context, "ssl", "peer_name")) == NULL) { in php_stream_url_wrap_http_ex() 253 if (context && (tmpzval = php_stream_context_get_option(context, "http", "header")) != NULL) { in php_stream_url_wrap_http_ex() 363 if (context && (tmpzval = php_stream_context_get_option(context, "http", "method")) != NULL) { in php_stream_url_wrap_http_ex() 383 if (!request_fulluri && context && in php_stream_url_wrap_http_ex() 409 …if (context && (tmpzval = php_stream_context_get_option(context, "http", "protocol_version")) != N… in php_stream_url_wrap_http_ex() 421 if (context && (tmpzval = php_stream_context_get_option(context, "http", "header")) != NULL) { in php_stream_url_wrap_http_ex() 590 if (context && in php_stream_url_wrap_http_ex() 624 context && in php_stream_url_wrap_http_ex() [all …]
|
/PHP-7.1/ext/sqlite3/tests/ |
H A D | sqlite3_25_create_aggregate.phpt | 10 function sum_list_step($context, $rows, $string) { 11 if (empty($context)) 13 $context = array('total' => 0, 'values' => array()); 15 $context['total'] += intval($string); 16 $context['values'][] = $context['total']; 17 return $context; 20 function sum_list_finalize($context) { 21 return implode(',', $context['values']);
|
/PHP-7.1/ext/standard/tests/file/ |
H A D | rename_variation9.phpt | 5 /* Prototype: bool rename ( string $oldname, string $newname [, resource $context] ); 9 echo "\n*** Testing rename() by giving stream context as third argument ***\n"; 12 $context = stream_context_create(); 20 var_dump( rename($dir_name, $new_dir_name, $context) ); 33 var_dump( rename($src_name, $dest_name, $context) ); 45 *** Testing rename() by giving stream context as third argument ***
|