Lines Matching refs:digest_size

166 	digest = zend_string_alloc(ops->digest_size, 0);  in php_hash_do_hash()
171 ZSTR_VAL(digest)[ops->digest_size] = 0; in php_hash_do_hash()
174 zend_string *hex_digest = zend_string_safe_alloc(ops->digest_size, 2, 0, 0); in php_hash_do_hash()
176 php_hash_bin2hex(ZSTR_VAL(hex_digest), (unsigned char *) ZSTR_VAL(digest), ops->digest_size); in php_hash_do_hash()
177 ZSTR_VAL(hex_digest)[2 * ops->digest_size] = 0; in php_hash_do_hash()
278 digest = zend_string_alloc(ops->digest_size, 0); in php_hash_do_hash_hmac()
305 …d char *) ZSTR_VAL(digest), ops, context, K, (unsigned char *) ZSTR_VAL(digest), ops->digest_size); in php_hash_do_hash_hmac()
313 ZSTR_VAL(digest)[ops->digest_size] = 0; in php_hash_do_hash_hmac()
316 zend_string *hex_digest = zend_string_safe_alloc(ops->digest_size, 2, 0, 0); in php_hash_do_hash_hmac()
318 php_hash_bin2hex(ZSTR_VAL(hex_digest), (unsigned char *) ZSTR_VAL(digest), ops->digest_size); in php_hash_do_hash_hmac()
319 ZSTR_VAL(hex_digest)[2 * ops->digest_size] = 0; in php_hash_do_hash_hmac()
532 digest_len = hash->ops->digest_size; in PHP_FUNCTION()
547 hash->ops->hash_update(hash->context, (unsigned char *) ZSTR_VAL(digest), hash->ops->digest_size); in PHP_FUNCTION()
658 length = ops->digest_size; in PHP_FUNCTION()
659 } else if (length > (zend_long) (ops->digest_size * 255)) { in PHP_FUNCTION()
660 …RNING, "Length must be less than or equal to %zd: " ZEND_LONG_FMT, ops->digest_size * 255, length); in PHP_FUNCTION()
672 prk = emalloc(ops->digest_size); in PHP_FUNCTION()
675 php_hash_hmac_round(prk, ops, context, K, prk, ops->digest_size); in PHP_FUNCTION()
680 digest = emalloc(ops->digest_size); in PHP_FUNCTION()
681 for (i = 1, rounds = (length - 1) / ops->digest_size + 1; i <= rounds; i++) { in PHP_FUNCTION()
686 php_hash_hmac_prep_key(K, ops, context, prk, ops->digest_size); in PHP_FUNCTION()
691 ops->hash_update(context, digest, ops->digest_size); in PHP_FUNCTION()
701 php_hash_hmac_round(digest, ops, context, K, digest, ops->digest_size); in PHP_FUNCTION()
703 ZSTR_VAL(returnval) + ((i - 1) * ops->digest_size), in PHP_FUNCTION()
705 (i == rounds ? length - ((i - 1) * ops->digest_size) : ops->digest_size) in PHP_FUNCTION()
710 ZEND_SECURE_ZERO(digest, ops->digest_size); in PHP_FUNCTION()
711 ZEND_SECURE_ZERO(prk, ops->digest_size); in PHP_FUNCTION()
768 digest = emalloc(ops->digest_size); in PHP_FUNCTION()
769 temp = emalloc(ops->digest_size); in PHP_FUNCTION()
778 length = ops->digest_size; in PHP_FUNCTION()
788 loops = (zend_long) ceil((float) digest_length / (float) ops->digest_size); in PHP_FUNCTION()
790 result = safe_emalloc(loops, ops->digest_size, 0); in PHP_FUNCTION()
805 php_hash_hmac_round(digest, ops, context, K2, digest, ops->digest_size); in PHP_FUNCTION()
809 memcpy(temp, digest, ops->digest_size); in PHP_FUNCTION()
817 php_hash_hmac_round(digest, ops, context, K1, digest, ops->digest_size); in PHP_FUNCTION()
818 php_hash_hmac_round(digest, ops, context, K2, digest, ops->digest_size); in PHP_FUNCTION()
821 php_hash_string_xor(temp, temp, digest, ops->digest_size); in PHP_FUNCTION()
824 memcpy(result + ((i - 1) * ops->digest_size), temp, ops->digest_size); in PHP_FUNCTION()
1030 RETVAL_LONG(ops->digest_size); in PHP_FUNCTION()
1077 size_t block_size = ops->digest_size; in PHP_FUNCTION()
1088 digest = emalloc(ops->digest_size + 1); in PHP_FUNCTION()
1136 unsigned char *dummy = emalloc(hash->ops->digest_size); in php_hashcontext_dtor()