Lines Matching refs:digest
119 zend_string *digest; in php_hash_do_hash() local
163 digest = zend_string_alloc(ops->digest_size, 0); in php_hash_do_hash()
164 ops->hash_final((unsigned char *) ZSTR_VAL(digest), context); in php_hash_do_hash()
168 ZSTR_VAL(digest)[ops->digest_size] = 0; in php_hash_do_hash() local
169 RETURN_NEW_STR(digest); 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()
175 zend_string_release(digest); in php_hash_do_hash()
236 zend_string *digest; in php_hash_do_hash_hmac() local
275 digest = zend_string_alloc(ops->digest_size, 0); in php_hash_do_hash_hmac()
288 ops->hash_final((unsigned char *) ZSTR_VAL(digest), context); in php_hash_do_hash_hmac()
290 …php_hash_hmac_round((unsigned char *) ZSTR_VAL(digest), ops, context, K, (unsigned char *) data, d… in php_hash_do_hash_hmac()
295 …php_hash_hmac_round((unsigned char *) ZSTR_VAL(digest), ops, context, K, (unsigned char *) ZSTR_VA… in php_hash_do_hash_hmac()
303 ZSTR_VAL(digest)[ops->digest_size] = 0; in php_hash_do_hash_hmac() local
304 RETURN_NEW_STR(digest); 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()
310 zend_string_release(digest); in php_hash_do_hash_hmac()
517 zend_string *digest; in PHP_FUNCTION() local
528 digest = zend_string_alloc(digest_len, 0); in PHP_FUNCTION()
529 hash->ops->hash_final((unsigned char *) ZSTR_VAL(digest), hash->context); in PHP_FUNCTION()
541 hash->ops->hash_update(hash->context, (unsigned char *) ZSTR_VAL(digest), hash->ops->digest_size); in PHP_FUNCTION()
542 hash->ops->hash_final((unsigned char *) ZSTR_VAL(digest), hash->context); in PHP_FUNCTION()
549 ZSTR_VAL(digest)[digest_len] = 0; in PHP_FUNCTION() local
556 RETURN_NEW_STR(digest); in PHP_FUNCTION()
560 php_hash_bin2hex(ZSTR_VAL(hex_digest), (unsigned char *) ZSTR_VAL(digest), digest_len); in PHP_FUNCTION()
562 zend_string_release(digest); in PHP_FUNCTION()
622 unsigned char *prk, *digest, *K; in PHP_FUNCTION() local
673 digest = emalloc(ops->digest_size); in PHP_FUNCTION()
684 ops->hash_update(context, digest, ops->digest_size); in PHP_FUNCTION()
692 ops->hash_final(digest, context); in PHP_FUNCTION()
694 php_hash_hmac_round(digest, ops, context, K, digest, ops->digest_size); in PHP_FUNCTION()
697 digest, in PHP_FUNCTION()
703 ZEND_SECURE_ZERO(digest, ops->digest_size); in PHP_FUNCTION()
708 efree(digest); in PHP_FUNCTION()
720 unsigned char *computed_salt, *digest, *temp, *result, *K1, *K2 = NULL; in PHP_FUNCTION() local
761 digest = emalloc(ops->digest_size); in PHP_FUNCTION()
797 php_hash_hmac_round(digest, ops, context, K1, computed_salt, (zend_long) salt_len + 4); 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()
827 efree(digest); in PHP_FUNCTION()
1068 char *key, *digest; in PHP_FUNCTION() local
1078 digest = emalloc(ops->digest_size + 1); in PHP_FUNCTION()
1088 ops->hash_final((unsigned char *)digest, context); in PHP_FUNCTION()
1089 memcpy( &key[i*block_size], digest, block_size); in PHP_FUNCTION()
1094 efree(digest); in PHP_FUNCTION()