Lines Matching refs:context

132 	void *context;  in php_hash_do_hash()  local
156 context = emalloc(ops->context_size); in php_hash_do_hash()
157 ops->hash_init(context); in php_hash_do_hash()
164 ops->hash_update(context, (unsigned char *) buf, n); in php_hash_do_hash()
168 ops->hash_update(context, (unsigned char *) data, data_len); in php_hash_do_hash()
172 ops->hash_final((unsigned char *) digest, context); in php_hash_do_hash()
173 efree(context); in php_hash_do_hash()
221 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
225 ops->hash_init(context); in php_hash_hmac_prep_key()
226 ops->hash_update(context, key, key_len); in php_hash_hmac_prep_key()
227 ops->hash_final(K, context); in php_hash_hmac_prep_key()
235 static inline void php_hash_hmac_round(unsigned char *final, const php_hash_ops *ops, void *context in php_hash_hmac_round() argument
236 ops->hash_init(context); in php_hash_hmac_round()
237 ops->hash_update(context, key, ops->block_size); in php_hash_hmac_round()
238 ops->hash_update(context, data, data_size); in php_hash_hmac_round()
239 ops->hash_final(final, context); in php_hash_hmac_round()
248 void *context; in php_hash_do_hash_hmac() local
273 context = emalloc(ops->context_size); in php_hash_do_hash_hmac()
278 php_hash_hmac_prep_key((unsigned char *) K, ops, context, (unsigned char *) key, key_len); in php_hash_do_hash_hmac()
283 ops->hash_init(context); in php_hash_do_hash_hmac()
284 ops->hash_update(context, (unsigned char *) K, ops->block_size); in php_hash_do_hash_hmac()
286 ops->hash_update(context, (unsigned char *) buf, n); in php_hash_do_hash_hmac()
289 ops->hash_final((unsigned char *) digest, context); in php_hash_do_hash_hmac()
291 …php_hash_hmac_round((unsigned char *) digest, ops, context, (unsigned char *) K, (unsigned char *)… in php_hash_do_hash_hmac()
296 …php_hash_hmac_round((unsigned char *) digest, ops, context, (unsigned char *) K, (unsigned char *)… in php_hash_do_hash_hmac()
301 efree(context); in php_hash_do_hash_hmac()
343 void *context; in PHP_FUNCTION() local
364 context = emalloc(ops->context_size); in PHP_FUNCTION()
365 ops->hash_init(context); in PHP_FUNCTION()
369 hash->context = context; in PHP_FUNCTION()
381 ops->hash_update(context, (unsigned char *) key, key_len); in PHP_FUNCTION()
382 ops->hash_final((unsigned char *) K, context); in PHP_FUNCTION()
384 ops->hash_init(context); in PHP_FUNCTION()
393 ops->hash_update(context, (unsigned char *) K, ops->block_size); in PHP_FUNCTION()
416 hash->ops->hash_update(hash->context, (unsigned char *) data, data_len); in PHP_FUNCTION()
450 hash->ops->hash_update(hash->context, (unsigned char *) buf, n); in PHP_FUNCTION()
465 php_stream_context *context; in PHP_FUNCTION() local
475 context = php_stream_context_from_zval(zcontext, 0); in PHP_FUNCTION()
477 stream = php_stream_open_wrapper_ex(filename, "rb", REPORT_ERRORS, NULL, context); in PHP_FUNCTION()
484 hash->ops->hash_update(hash->context, (unsigned char *) buf, n); in PHP_FUNCTION()
511 hash->ops->hash_final((unsigned char *) digest, hash->context); in PHP_FUNCTION()
521 hash->ops->hash_init(hash->context); in PHP_FUNCTION()
522 hash->ops->hash_update(hash->context, (unsigned char *) hash->key, hash->ops->block_size); in PHP_FUNCTION()
523 hash->ops->hash_update(hash->context, (unsigned char *) digest, hash->ops->digest_size); in PHP_FUNCTION()
524 hash->ops->hash_final((unsigned char *) digest, hash->context); in PHP_FUNCTION()
532 efree(hash->context); in PHP_FUNCTION()
533 hash->context = NULL; in PHP_FUNCTION()
562 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()
623 void *context; in PHP_FUNCTION() local
650 context = emalloc(ops->context_size); in PHP_FUNCTION()
651 ops->hash_init(context); in PHP_FUNCTION()
659 php_hash_hmac_prep_key(K1, ops, context, (unsigned char *) pass, pass_len); in PHP_FUNCTION()
691 php_hash_hmac_round(digest, ops, context, K1, computed_salt, (long) salt_len + 4); in PHP_FUNCTION()
692 php_hash_hmac_round(digest, ops, context, K2, digest, ops->digest_size); in PHP_FUNCTION()
704 php_hash_hmac_round(digest, ops, context, K1, digest, ops->digest_size); in PHP_FUNCTION()
705 php_hash_hmac_round(digest, ops, context, K2, digest, ops->digest_size); in PHP_FUNCTION()
720 efree(context); in PHP_FUNCTION()
743 if (hash->context) { in php_hash_dtor()
745 hash->ops->hash_final(dummy, hash->context); in php_hash_dtor()
747 efree(hash->context); in php_hash_dtor()
925 void *context; in PHP_FUNCTION() local
932 context = emalloc(ops->context_size); in PHP_FUNCTION()
933 ops->hash_init(context); in PHP_FUNCTION()
939 ops->hash_init(context); in PHP_FUNCTION()
942 ops->hash_update(context, &null, 1); in PHP_FUNCTION()
944 ops->hash_update(context, (unsigned char *)padded_salt, salt_len); in PHP_FUNCTION()
945 ops->hash_update(context, (unsigned char *)password, password_len); in PHP_FUNCTION()
946 ops->hash_final((unsigned char *)digest, context); in PHP_FUNCTION()
953 efree(context); in PHP_FUNCTION()
1120 ZEND_ARG_INFO(0, context)
1125 ZEND_ARG_INFO(0, context)
1131 ZEND_ARG_INFO(0, context)
1133 ZEND_ARG_INFO(0, context)
1137 ZEND_ARG_INFO(0, context)
1142 ZEND_ARG_INFO(0, context)