Lines Matching refs:context

126 	void *context;  in php_hash_do_hash()  local
150 context = emalloc(ops->context_size); in php_hash_do_hash()
151 ops->hash_init(context); in php_hash_do_hash()
158 ops->hash_update(context, (unsigned char *) buf, n); in php_hash_do_hash()
162 ops->hash_update(context, (unsigned char *) data, data_len); in php_hash_do_hash()
166 ops->hash_final((unsigned char *) ZSTR_VAL(digest), context); in php_hash_do_hash()
167 efree(context); in php_hash_do_hash()
215 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
219 ops->hash_init(context); in php_hash_hmac_prep_key()
220 ops->hash_update(context, key, key_len); in php_hash_hmac_prep_key()
221 ops->hash_final(K, context); in php_hash_hmac_prep_key()
229 static inline void php_hash_hmac_round(unsigned char *final, const php_hash_ops *ops, void *context in php_hash_hmac_round() argument
230 ops->hash_init(context); in php_hash_hmac_round()
231 ops->hash_update(context, key, ops->block_size); in php_hash_hmac_round()
232 ops->hash_update(context, data, data_size); in php_hash_hmac_round()
233 ops->hash_final(final, context); in php_hash_hmac_round()
244 void *context; in php_hash_do_hash_hmac() local
269 context = emalloc(ops->context_size); in php_hash_do_hash_hmac()
274 php_hash_hmac_prep_key(K, ops, context, (unsigned char *) key, key_len); in php_hash_do_hash_hmac()
279 ops->hash_init(context); in php_hash_do_hash_hmac()
280 ops->hash_update(context, K, ops->block_size); in php_hash_do_hash_hmac()
282 ops->hash_update(context, (unsigned char *) buf, n); in php_hash_do_hash_hmac()
285 ops->hash_final((unsigned char *) ZSTR_VAL(digest), context); in php_hash_do_hash_hmac()
287 …php_hash_hmac_round((unsigned char *) ZSTR_VAL(digest), ops, context, K, (unsigned char *) data, d… in php_hash_do_hash_hmac()
292 …php_hash_hmac_round((unsigned char *) ZSTR_VAL(digest), ops, context, K, (unsigned char *) ZSTR_VA… in php_hash_do_hash_hmac()
297 efree(context); in php_hash_do_hash_hmac()
340 void *context; in PHP_FUNCTION() local
361 context = emalloc(ops->context_size); in PHP_FUNCTION()
362 ops->hash_init(context); in PHP_FUNCTION()
366 hash->context = context; in PHP_FUNCTION()
378 ops->hash_update(context, (unsigned char *) key, key_len); in PHP_FUNCTION()
379 ops->hash_final((unsigned char *) K, context); in PHP_FUNCTION()
381 ops->hash_init(context); in PHP_FUNCTION()
390 ops->hash_update(context, (unsigned char *) K, ops->block_size); in PHP_FUNCTION()
415 hash->ops->hash_update(hash->context, (unsigned char *) data, data_len); in PHP_FUNCTION()
452 hash->ops->hash_update(hash->context, (unsigned char *) buf, n); in PHP_FUNCTION()
467 php_stream_context *context; in PHP_FUNCTION() local
479 context = php_stream_context_from_zval(zcontext, 0); in PHP_FUNCTION()
481 stream = php_stream_open_wrapper_ex(filename, "rb", REPORT_ERRORS, NULL, context); in PHP_FUNCTION()
488 hash->ops->hash_update(hash->context, (unsigned char *) buf, n); in PHP_FUNCTION()
516 hash->ops->hash_final((unsigned char *) ZSTR_VAL(digest), hash->context); in PHP_FUNCTION()
526 hash->ops->hash_init(hash->context); in PHP_FUNCTION()
527 hash->ops->hash_update(hash->context, hash->key, hash->ops->block_size); in PHP_FUNCTION()
528 hash->ops->hash_update(hash->context, (unsigned char *) ZSTR_VAL(digest), hash->ops->digest_size); in PHP_FUNCTION()
529 hash->ops->hash_final((unsigned char *) ZSTR_VAL(digest), hash->context); in PHP_FUNCTION()
537 efree(hash->context); in PHP_FUNCTION()
538 hash->context = NULL; in PHP_FUNCTION()
560 void *context; in PHP_FUNCTION() local
572 context = emalloc(hash->ops->context_size); in PHP_FUNCTION()
573 hash->ops->hash_init(context); in PHP_FUNCTION()
575 res = hash->ops->hash_copy(hash->ops, hash->context, context); in PHP_FUNCTION()
577 efree(context); in PHP_FUNCTION()
583 copy_hash->context = context; in PHP_FUNCTION()
618 void *context; in PHP_FUNCTION() local
645 context = emalloc(ops->context_size); in PHP_FUNCTION()
646 ops->hash_init(context); in PHP_FUNCTION()
654 php_hash_hmac_prep_key(K1, ops, context, (unsigned char *) pass, pass_len); in PHP_FUNCTION()
686 php_hash_hmac_round(digest, ops, context, K1, computed_salt, (zend_long) salt_len + 4); in PHP_FUNCTION()
687 php_hash_hmac_round(digest, ops, context, K2, digest, ops->digest_size); in PHP_FUNCTION()
699 php_hash_hmac_round(digest, ops, context, K1, digest, ops->digest_size); in PHP_FUNCTION()
700 php_hash_hmac_round(digest, ops, context, K2, digest, ops->digest_size); in PHP_FUNCTION()
715 efree(context); in PHP_FUNCTION()
778 if (hash->context) { in php_hash_dtor()
780 hash->ops->hash_final(dummy, hash->context); in php_hash_dtor()
782 efree(hash->context); in php_hash_dtor()
963 void *context; in PHP_FUNCTION() local
970 context = emalloc(ops->context_size); in PHP_FUNCTION()
971 ops->hash_init(context); in PHP_FUNCTION()
977 ops->hash_init(context); in PHP_FUNCTION()
980 ops->hash_update(context, &null, 1); in PHP_FUNCTION()
982 ops->hash_update(context, (unsigned char *)padded_salt, salt_len); in PHP_FUNCTION()
983 ops->hash_update(context, (unsigned char *)password, password_len); in PHP_FUNCTION()
984 ops->hash_final((unsigned char *)digest, context); in PHP_FUNCTION()
991 efree(context); in PHP_FUNCTION()
1165 ZEND_ARG_INFO(0, context)
1170 ZEND_ARG_INFO(0, context)
1176 ZEND_ARG_INFO(0, context)
1178 ZEND_ARG_INFO(0, context)
1182 ZEND_ARG_INFO(0, context)
1187 ZEND_ARG_INFO(0, context)