Lines Matching refs:digest_size
163 digest = zend_string_alloc(ops->digest_size, 0); in php_hash_do_hash()
168 ZSTR_VAL(digest)[ops->digest_size] = 0; in php_hash_do_hash()
171 zend_string *hex_digest = zend_string_safe_alloc(ops->digest_size, 2, 0, 0); in php_hash_do_hash()
173 php_hash_bin2hex(ZSTR_VAL(hex_digest), (unsigned char *) ZSTR_VAL(digest), ops->digest_size); in php_hash_do_hash()
174 ZSTR_VAL(hex_digest)[2 * ops->digest_size] = 0; in php_hash_do_hash()
275 digest = zend_string_alloc(ops->digest_size, 0); in php_hash_do_hash_hmac()
295 …d char *) ZSTR_VAL(digest), ops, context, K, (unsigned char *) ZSTR_VAL(digest), ops->digest_size); in php_hash_do_hash_hmac()
303 ZSTR_VAL(digest)[ops->digest_size] = 0; in php_hash_do_hash_hmac()
306 zend_string *hex_digest = zend_string_safe_alloc(ops->digest_size, 2, 0, 0); in php_hash_do_hash_hmac()
308 php_hash_bin2hex(ZSTR_VAL(hex_digest), (unsigned char *) ZSTR_VAL(digest), ops->digest_size); in php_hash_do_hash_hmac()
309 ZSTR_VAL(hex_digest)[2 * ops->digest_size] = 0; in php_hash_do_hash_hmac()
527 digest_len = hash->ops->digest_size; in PHP_FUNCTION()
541 hash->ops->hash_update(hash->context, (unsigned char *) ZSTR_VAL(digest), hash->ops->digest_size); in PHP_FUNCTION()
651 length = ops->digest_size; in PHP_FUNCTION()
652 } else if (length > ops->digest_size * 255) { in PHP_FUNCTION()
653 …ARNING, "Length must be less than or equal to %d: " ZEND_LONG_FMT, ops->digest_size * 255, length); in PHP_FUNCTION()
665 prk = emalloc(ops->digest_size); in PHP_FUNCTION()
668 php_hash_hmac_round(prk, ops, context, K, prk, ops->digest_size); in PHP_FUNCTION()
673 digest = emalloc(ops->digest_size); in PHP_FUNCTION()
674 for (i = 1, rounds = (length - 1) / ops->digest_size + 1; i <= rounds; i++) { in PHP_FUNCTION()
679 php_hash_hmac_prep_key(K, ops, context, prk, ops->digest_size); in PHP_FUNCTION()
684 ops->hash_update(context, digest, ops->digest_size); in PHP_FUNCTION()
694 php_hash_hmac_round(digest, ops, context, K, digest, ops->digest_size); in PHP_FUNCTION()
696 ZSTR_VAL(returnval) + ((i - 1) * ops->digest_size), in PHP_FUNCTION()
698 (i == rounds ? length - ((i - 1) * ops->digest_size) : ops->digest_size) in PHP_FUNCTION()
703 ZEND_SECURE_ZERO(digest, ops->digest_size); in PHP_FUNCTION()
704 ZEND_SECURE_ZERO(prk, ops->digest_size); in PHP_FUNCTION()
761 digest = emalloc(ops->digest_size); in PHP_FUNCTION()
762 temp = emalloc(ops->digest_size); in PHP_FUNCTION()
771 length = ops->digest_size; in PHP_FUNCTION()
781 loops = (zend_long) ceil((float) digest_length / (float) ops->digest_size); in PHP_FUNCTION()
783 result = safe_emalloc(loops, ops->digest_size, 0); in PHP_FUNCTION()
798 php_hash_hmac_round(digest, ops, context, K2, digest, ops->digest_size); in PHP_FUNCTION()
802 memcpy(temp, digest, ops->digest_size); in PHP_FUNCTION()
810 php_hash_hmac_round(digest, ops, context, K1, digest, ops->digest_size); in PHP_FUNCTION()
811 php_hash_hmac_round(digest, ops, context, K2, digest, ops->digest_size); in PHP_FUNCTION()
814 php_hash_string_xor(temp, temp, digest, ops->digest_size); in PHP_FUNCTION()
817 memcpy(result + ((i - 1) * ops->digest_size), temp, ops->digest_size); in PHP_FUNCTION()
1023 RETVAL_LONG(ops->digest_size); in PHP_FUNCTION()
1070 int block_size = ops->digest_size; in PHP_FUNCTION()
1078 digest = emalloc(ops->digest_size + 1); in PHP_FUNCTION()
1126 unsigned char *dummy = emalloc(hash->ops->digest_size); in php_hashcontext_dtor()