Lines Matching refs:digest_size
403 digest = zend_string_alloc(ops->digest_size, 0); in php_hash_do_hash()
408 ZSTR_VAL(digest)[ops->digest_size] = 0; in php_hash_do_hash()
411 zend_string *hex_digest = zend_string_safe_alloc(ops->digest_size, 2, 0, 0); in php_hash_do_hash()
413 php_hash_bin2hex(ZSTR_VAL(hex_digest), (unsigned char *) ZSTR_VAL(digest), ops->digest_size); in php_hash_do_hash()
414 ZSTR_VAL(hex_digest)[2 * ops->digest_size] = 0; in php_hash_do_hash()
530 digest = zend_string_alloc(ops->digest_size, 0); in php_hash_do_hash_hmac()
557 …d char *) ZSTR_VAL(digest), ops, context, K, (unsigned char *) ZSTR_VAL(digest), ops->digest_size); in php_hash_do_hash_hmac()
565 ZSTR_VAL(digest)[ops->digest_size] = 0; in php_hash_do_hash_hmac()
568 zend_string *hex_digest = zend_string_safe_alloc(ops->digest_size, 2, 0, 0); in php_hash_do_hash_hmac()
570 php_hash_bin2hex(ZSTR_VAL(hex_digest), (unsigned char *) ZSTR_VAL(digest), ops->digest_size); in php_hash_do_hash_hmac()
571 ZSTR_VAL(hex_digest)[2 * ops->digest_size] = 0; in php_hash_do_hash_hmac()
795 digest_len = hash->ops->digest_size; in PHP_FUNCTION()
810 hash->ops->hash_update(hash->context, (unsigned char *) ZSTR_VAL(digest), hash->ops->digest_size); in PHP_FUNCTION()
926 length = ops->digest_size; in PHP_FUNCTION()
927 } else if (length > (zend_long) (ops->digest_size * 255)) { in PHP_FUNCTION()
928 zend_argument_value_error(3, "must be less than or equal to %zd", ops->digest_size * 255); in PHP_FUNCTION()
940 prk = emalloc(ops->digest_size); in PHP_FUNCTION()
943 php_hash_hmac_round(prk, ops, context, K, prk, ops->digest_size); in PHP_FUNCTION()
948 digest = emalloc(ops->digest_size); in PHP_FUNCTION()
949 for (i = 1, rounds = (length - 1) / ops->digest_size + 1; i <= rounds; i++) { in PHP_FUNCTION()
954 php_hash_hmac_prep_key(K, ops, context, prk, ops->digest_size); in PHP_FUNCTION()
959 ops->hash_update(context, digest, ops->digest_size); in PHP_FUNCTION()
969 php_hash_hmac_round(digest, ops, context, K, digest, ops->digest_size); in PHP_FUNCTION()
971 ZSTR_VAL(returnval) + ((i - 1) * ops->digest_size), in PHP_FUNCTION()
973 (i == rounds ? length - ((i - 1) * ops->digest_size) : ops->digest_size) in PHP_FUNCTION()
978 ZEND_SECURE_ZERO(digest, ops->digest_size); in PHP_FUNCTION()
979 ZEND_SECURE_ZERO(prk, ops->digest_size); in PHP_FUNCTION()
1032 digest = emalloc(ops->digest_size); in PHP_FUNCTION()
1033 temp = emalloc(ops->digest_size); in PHP_FUNCTION()
1042 length = ops->digest_size; in PHP_FUNCTION()
1052 loops = (zend_long) ceil((float) digest_length / (float) ops->digest_size); in PHP_FUNCTION()
1054 result = safe_emalloc(loops, ops->digest_size, 0); in PHP_FUNCTION()
1069 php_hash_hmac_round(digest, ops, context, K2, digest, ops->digest_size); in PHP_FUNCTION()
1073 memcpy(temp, digest, ops->digest_size); in PHP_FUNCTION()
1081 php_hash_hmac_round(digest, ops, context, K1, digest, ops->digest_size); in PHP_FUNCTION()
1082 php_hash_hmac_round(digest, ops, context, K2, digest, ops->digest_size); in PHP_FUNCTION()
1085 php_hash_string_xor(temp, temp, digest, ops->digest_size); in PHP_FUNCTION()
1088 memcpy(result + ((i - 1) * ops->digest_size), temp, ops->digest_size); in PHP_FUNCTION()
1279 RETVAL_LONG(ops->digest_size); in PHP_FUNCTION()
1325 size_t block_size = ops->digest_size; in PHP_FUNCTION()
1336 digest = emalloc(ops->digest_size + 1); in PHP_FUNCTION()