Lines Matching refs:buf

179 static uint64_t one_from_buffer(size_t sz, const unsigned char *buf) {  in one_from_buffer()  argument
181 const uint16_t *x = (const uint16_t *) buf; in one_from_buffer()
184 const uint32_t *x = (const uint32_t *) buf; in one_from_buffer()
187 const uint64_t *x = (const uint64_t *) buf; in one_from_buffer()
191 return *buf; in one_from_buffer()
195 static void one_to_buffer(size_t sz, unsigned char *buf, uint64_t val) { in one_to_buffer() argument
197 uint16_t *x = (uint16_t *) buf; in one_to_buffer()
200 uint32_t *x = (uint32_t *) buf; in one_to_buffer()
203 uint64_t *x = (uint64_t *) buf; in one_to_buffer()
207 *buf = val; in one_to_buffer()
235 unsigned char *buf = (unsigned char *) hash->context; in php_hash_serialize_spec() local
237 if (buf == NULL) { in php_hash_serialize_spec()
250 ZVAL_STRINGL(&tmp, (char *) buf + pos, count); in php_hash_serialize_spec()
255 uint64_t val = one_from_buffer(sz, buf + pos); in php_hash_serialize_spec()
283 unsigned char *buf = (unsigned char *) hash->context; in php_hash_unserialize_spec() local
302 memcpy(buf + pos, Z_STRVAL_P(elt), count); in php_hash_unserialize_spec()
321 one_to_buffer(sz, buf + pos, val); in php_hash_unserialize_spec()
387 char buf[1024]; in php_hash_do_hash() local
390 while ((n = php_stream_read(stream, buf, sizeof(buf))) > 0) { in php_hash_do_hash()
391 ops->hash_update(context, (unsigned char *) buf, n); in php_hash_do_hash()
534 char buf[1024]; in php_hash_do_hash_hmac() local
538 while ((n = php_stream_read(stream, buf, sizeof(buf))) > 0) { in php_hash_do_hash_hmac()
539 ops->hash_update(context, (unsigned char *) buf, n); in php_hash_do_hash_hmac()
724 char buf[1024]; in PHP_FUNCTION() local
732 if ((n = php_stream_read(stream, buf, toread)) <= 0) { in PHP_FUNCTION()
735 hash->ops->hash_update(hash->context, (unsigned char *) buf, n); in PHP_FUNCTION()
752 char buf[1024]; in PHP_FUNCTION() local
769 while ((n = php_stream_read(stream, buf, sizeof(buf))) > 0) { in PHP_FUNCTION()
770 hash->ops->hash_update(hash->context, (unsigned char *) buf, n); in PHP_FUNCTION()
1181 char buf[128]; in mhash_init() local
1191 len = slprintf(buf, 127, "MHASH_%s", algorithm.mhash_name); in mhash_init()
1192 zend_register_long_constant(buf, len, algorithm.value, CONST_PERSISTENT, module_number); in mhash_init()