Lines Matching refs:digest_size
402 digest = zend_string_alloc(ops->digest_size, 0); in php_hash_do_hash()
407 ZSTR_VAL(digest)[ops->digest_size] = 0; in php_hash_do_hash()
410 zend_string *hex_digest = zend_string_safe_alloc(ops->digest_size, 2, 0, 0); in php_hash_do_hash()
412 php_hash_bin2hex(ZSTR_VAL(hex_digest), (unsigned char *) ZSTR_VAL(digest), ops->digest_size); in php_hash_do_hash()
413 ZSTR_VAL(hex_digest)[2 * ops->digest_size] = 0; in php_hash_do_hash()
529 digest = zend_string_alloc(ops->digest_size, 0); in php_hash_do_hash_hmac()
556 …d char *) ZSTR_VAL(digest), ops, context, K, (unsigned char *) ZSTR_VAL(digest), ops->digest_size); in php_hash_do_hash_hmac()
564 ZSTR_VAL(digest)[ops->digest_size] = 0; in php_hash_do_hash_hmac()
567 zend_string *hex_digest = zend_string_safe_alloc(ops->digest_size, 2, 0, 0); in php_hash_do_hash_hmac()
569 php_hash_bin2hex(ZSTR_VAL(hex_digest), (unsigned char *) ZSTR_VAL(digest), ops->digest_size); in php_hash_do_hash_hmac()
570 ZSTR_VAL(hex_digest)[2 * ops->digest_size] = 0; in php_hash_do_hash_hmac()
794 digest_len = hash->ops->digest_size; in PHP_FUNCTION()
809 hash->ops->hash_update(hash->context, (unsigned char *) ZSTR_VAL(digest), hash->ops->digest_size); in PHP_FUNCTION()
925 length = ops->digest_size; in PHP_FUNCTION()
926 } else if (length > (zend_long) (ops->digest_size * 255)) { in PHP_FUNCTION()
927 zend_argument_value_error(3, "must be less than or equal to %zd", ops->digest_size * 255); in PHP_FUNCTION()
939 prk = emalloc(ops->digest_size); in PHP_FUNCTION()
942 php_hash_hmac_round(prk, ops, context, K, prk, ops->digest_size); in PHP_FUNCTION()
947 digest = emalloc(ops->digest_size); in PHP_FUNCTION()
948 for (i = 1, rounds = (length - 1) / ops->digest_size + 1; i <= rounds; i++) { in PHP_FUNCTION()
953 php_hash_hmac_prep_key(K, ops, context, prk, ops->digest_size); in PHP_FUNCTION()
958 ops->hash_update(context, digest, ops->digest_size); in PHP_FUNCTION()
968 php_hash_hmac_round(digest, ops, context, K, digest, ops->digest_size); in PHP_FUNCTION()
970 ZSTR_VAL(returnval) + ((i - 1) * ops->digest_size), in PHP_FUNCTION()
972 (i == rounds ? length - ((i - 1) * ops->digest_size) : ops->digest_size) in PHP_FUNCTION()
977 ZEND_SECURE_ZERO(digest, ops->digest_size); in PHP_FUNCTION()
978 ZEND_SECURE_ZERO(prk, ops->digest_size); in PHP_FUNCTION()
1031 digest = emalloc(ops->digest_size); in PHP_FUNCTION()
1032 temp = emalloc(ops->digest_size); in PHP_FUNCTION()
1041 length = ops->digest_size; in PHP_FUNCTION()
1051 loops = (zend_long) ceil((float) digest_length / (float) ops->digest_size); in PHP_FUNCTION()
1053 result = safe_emalloc(loops, ops->digest_size, 0); in PHP_FUNCTION()
1068 php_hash_hmac_round(digest, ops, context, K2, digest, ops->digest_size); in PHP_FUNCTION()
1072 memcpy(temp, digest, ops->digest_size); in PHP_FUNCTION()
1080 php_hash_hmac_round(digest, ops, context, K1, digest, ops->digest_size); in PHP_FUNCTION()
1081 php_hash_hmac_round(digest, ops, context, K2, digest, ops->digest_size); in PHP_FUNCTION()
1084 php_hash_string_xor(temp, temp, digest, ops->digest_size); in PHP_FUNCTION()
1087 memcpy(result + ((i - 1) * ops->digest_size), temp, ops->digest_size); in PHP_FUNCTION()
1285 RETVAL_LONG(ops->digest_size); in PHP_FUNCTION()
1331 size_t block_size = ops->digest_size; in PHP_FUNCTION()
1342 digest = emalloc(ops->digest_size + 1); in PHP_FUNCTION()