Lines Matching refs:context

120 	void *context;  in php_hash_do_hash()  local
144 context = emalloc(ops->context_size); in php_hash_do_hash()
145 ops->hash_init(context); in php_hash_do_hash()
152 ops->hash_update(context, (unsigned char *) buf, n); in php_hash_do_hash()
156 ops->hash_update(context, (unsigned char *) data, data_len); in php_hash_do_hash()
160 ops->hash_final((unsigned char *) ZSTR_VAL(digest), context); in php_hash_do_hash()
161 efree(context); in php_hash_do_hash()
209 static inline void php_hash_hmac_prep_key(unsigned char *K, const php_hash_ops *ops, void *context,… in php_hash_hmac_prep_key() argument
213 ops->hash_init(context); in php_hash_hmac_prep_key()
214 ops->hash_update(context, key, key_len); in php_hash_hmac_prep_key()
215 ops->hash_final(K, context); in php_hash_hmac_prep_key()
223 static inline void php_hash_hmac_round(unsigned char *final, const php_hash_ops *ops, void *context in php_hash_hmac_round() argument
224 ops->hash_init(context); in php_hash_hmac_round()
225 ops->hash_update(context, key, ops->block_size); in php_hash_hmac_round()
226 ops->hash_update(context, data, data_size); in php_hash_hmac_round()
227 ops->hash_final(final, context); in php_hash_hmac_round()
238 void *context; in php_hash_do_hash_hmac() local
263 context = emalloc(ops->context_size); in php_hash_do_hash_hmac()
268 php_hash_hmac_prep_key(K, ops, context, (unsigned char *) key, key_len); in php_hash_do_hash_hmac()
273 ops->hash_init(context); in php_hash_do_hash_hmac()
274 ops->hash_update(context, K, ops->block_size); in php_hash_do_hash_hmac()
276 ops->hash_update(context, (unsigned char *) buf, n); in php_hash_do_hash_hmac()
279 ops->hash_final((unsigned char *) ZSTR_VAL(digest), context); in php_hash_do_hash_hmac()
281 …php_hash_hmac_round((unsigned char *) ZSTR_VAL(digest), ops, context, K, (unsigned char *) data, d… in php_hash_do_hash_hmac()
286 …php_hash_hmac_round((unsigned char *) ZSTR_VAL(digest), ops, context, K, (unsigned char *) ZSTR_VA… in php_hash_do_hash_hmac()
291 efree(context); in php_hash_do_hash_hmac()
334 void *context; in PHP_FUNCTION() local
355 context = emalloc(ops->context_size); in PHP_FUNCTION()
356 ops->hash_init(context); in PHP_FUNCTION()
360 hash->context = context; in PHP_FUNCTION()
372 ops->hash_update(context, (unsigned char *) key, key_len); in PHP_FUNCTION()
373 ops->hash_final((unsigned char *) K, context); in PHP_FUNCTION()
375 ops->hash_init(context); in PHP_FUNCTION()
384 ops->hash_update(context, (unsigned char *) K, ops->block_size); in PHP_FUNCTION()
409 hash->ops->hash_update(hash->context, (unsigned char *) data, data_len); in PHP_FUNCTION()
446 hash->ops->hash_update(hash->context, (unsigned char *) buf, n); in PHP_FUNCTION()
461 php_stream_context *context; in PHP_FUNCTION() local
473 context = php_stream_context_from_zval(zcontext, 0); in PHP_FUNCTION()
475 stream = php_stream_open_wrapper_ex(filename, "rb", REPORT_ERRORS, NULL, context); in PHP_FUNCTION()
482 hash->ops->hash_update(hash->context, (unsigned char *) buf, n); in PHP_FUNCTION()
510 hash->ops->hash_final((unsigned char *) ZSTR_VAL(digest), hash->context); in PHP_FUNCTION()
520 hash->ops->hash_init(hash->context); in PHP_FUNCTION()
521 hash->ops->hash_update(hash->context, hash->key, hash->ops->block_size); in PHP_FUNCTION()
522 hash->ops->hash_update(hash->context, (unsigned char *) ZSTR_VAL(digest), hash->ops->digest_size); in PHP_FUNCTION()
523 hash->ops->hash_final((unsigned char *) ZSTR_VAL(digest), hash->context); in PHP_FUNCTION()
531 efree(hash->context); in PHP_FUNCTION()
532 hash->context = NULL; in PHP_FUNCTION()
554 void *context; in PHP_FUNCTION() local
566 context = emalloc(hash->ops->context_size); in PHP_FUNCTION()
567 hash->ops->hash_init(context); in PHP_FUNCTION()
569 res = hash->ops->hash_copy(hash->ops, hash->context, context); in PHP_FUNCTION()
571 efree(context); in PHP_FUNCTION()
577 copy_hash->context = context; in PHP_FUNCTION()
628 void *context; in PHP_FUNCTION() local
660 context = emalloc(ops->context_size); in PHP_FUNCTION()
663 ops->hash_init(context); in PHP_FUNCTION()
665 php_hash_hmac_prep_key(K, ops, context, in PHP_FUNCTION()
669 php_hash_hmac_round(prk, ops, context, K, (unsigned char *) ZSTR_VAL(ikm), ZSTR_LEN(ikm)); in PHP_FUNCTION()
671 php_hash_hmac_round(prk, ops, context, K, prk, ops->digest_size); in PHP_FUNCTION()
682 php_hash_hmac_prep_key(K, ops, context, prk, ops->digest_size); in PHP_FUNCTION()
683 ops->hash_init(context); in PHP_FUNCTION()
684 ops->hash_update(context, K, ops->block_size); in PHP_FUNCTION()
687 ops->hash_update(context, digest, ops->digest_size); in PHP_FUNCTION()
691 ops->hash_update(context, (unsigned char *) ZSTR_VAL(info), ZSTR_LEN(info)); in PHP_FUNCTION()
694 ops->hash_update(context, c, 1); in PHP_FUNCTION()
695 ops->hash_final(digest, context); in PHP_FUNCTION()
697 php_hash_hmac_round(digest, ops, context, K, digest, ops->digest_size); in PHP_FUNCTION()
709 efree(context); in PHP_FUNCTION()
728 void *context; in PHP_FUNCTION() local
755 context = emalloc(ops->context_size); in PHP_FUNCTION()
756 ops->hash_init(context); in PHP_FUNCTION()
764 php_hash_hmac_prep_key(K1, ops, context, (unsigned char *) pass, pass_len); in PHP_FUNCTION()
796 php_hash_hmac_round(digest, ops, context, K1, computed_salt, (zend_long) salt_len + 4); in PHP_FUNCTION()
797 php_hash_hmac_round(digest, ops, context, K2, digest, ops->digest_size); in PHP_FUNCTION()
809 php_hash_hmac_round(digest, ops, context, K1, digest, ops->digest_size); in PHP_FUNCTION()
810 php_hash_hmac_round(digest, ops, context, K2, digest, ops->digest_size); in PHP_FUNCTION()
825 efree(context); in PHP_FUNCTION()
889 if (hash->context) { in php_hash_dtor()
891 hash->ops->hash_final(dummy, hash->context); in php_hash_dtor()
893 efree(hash->context); in php_hash_dtor()
1074 void *context; in PHP_FUNCTION() local
1081 context = emalloc(ops->context_size); in PHP_FUNCTION()
1082 ops->hash_init(context); in PHP_FUNCTION()
1088 ops->hash_init(context); in PHP_FUNCTION()
1091 ops->hash_update(context, &null, 1); in PHP_FUNCTION()
1093 ops->hash_update(context, (unsigned char *)padded_salt, salt_len); in PHP_FUNCTION()
1094 ops->hash_update(context, (unsigned char *)password, password_len); in PHP_FUNCTION()
1095 ops->hash_final((unsigned char *)digest, context); in PHP_FUNCTION()
1102 efree(context); in PHP_FUNCTION()
1282 ZEND_ARG_INFO(0, context)
1287 ZEND_ARG_INFO(0, context)
1293 ZEND_ARG_INFO(0, context)
1299 ZEND_ARG_INFO(0, context)
1304 ZEND_ARG_INFO(0, context)