Lines Matching refs:block_size
479 memset(K, 0, ops->block_size); in php_hash_hmac_prep_key()
480 if (key_len > ops->block_size) { in php_hash_hmac_prep_key()
489 php_hash_string_xor_char(K, K, 0x36, ops->block_size); in php_hash_hmac_prep_key()
494 ops->hash_update(context, key, ops->block_size); in php_hash_hmac_round()
528 K = emalloc(ops->block_size); in php_hash_do_hash_hmac()
537 ops->hash_update(context, K, ops->block_size); in php_hash_do_hash_hmac()
554 php_hash_string_xor_char(K, K, 0x6A, ops->block_size); in php_hash_do_hash_hmac()
559 ZEND_SECURE_ZERO(K, ops->block_size); in php_hash_do_hash_hmac()
655 char *K = emalloc(ops->block_size); in PHP_FUNCTION()
656 size_t i, block_size; in PHP_FUNCTION() local
658 memset(K, 0, ops->block_size); in PHP_FUNCTION()
660 if (ZSTR_LEN(key) > ops->block_size) { in PHP_FUNCTION()
671 block_size = ops->block_size; in PHP_FUNCTION()
672 for(i = 0; i < block_size; i++) { in PHP_FUNCTION()
675 ops->hash_update(context, (unsigned char *) K, ops->block_size); in PHP_FUNCTION()
798 size_t i, block_size; in PHP_FUNCTION() local
801 block_size = hash->ops->block_size; in PHP_FUNCTION()
802 for(i = 0; i < block_size; i++) { in PHP_FUNCTION()
808 hash->ops->hash_update(hash->context, hash->key, hash->ops->block_size); in PHP_FUNCTION()
813 ZEND_SECURE_ZERO(hash->key, hash->ops->block_size); in PHP_FUNCTION()
935 K = emalloc(ops->block_size); in PHP_FUNCTION()
941 php_hash_string_xor_char(K, K, 0x6A, ops->block_size); in PHP_FUNCTION()
943 ZEND_SECURE_ZERO(K, ops->block_size); in PHP_FUNCTION()
955 ops->hash_update(context, K, ops->block_size); in PHP_FUNCTION()
967 php_hash_string_xor_char(K, K, 0x6A, ops->block_size); in PHP_FUNCTION()
976 ZEND_SECURE_ZERO(K, ops->block_size); in PHP_FUNCTION()
1029 K1 = emalloc(ops->block_size); in PHP_FUNCTION()
1030 K2 = emalloc(ops->block_size); in PHP_FUNCTION()
1037 php_hash_string_xor_char(K2, K1, 0x6A, ops->block_size); in PHP_FUNCTION()
1090 ZEND_SECURE_ZERO(K1, ops->block_size); in PHP_FUNCTION()
1091 ZEND_SECURE_ZERO(K2, ops->block_size); in PHP_FUNCTION()
1331 size_t block_size = ops->digest_size; in PHP_FUNCTION() local
1332 size_t times = bytes / block_size; in PHP_FUNCTION()
1334 if ((bytes % block_size) != 0) { in PHP_FUNCTION()
1341 key = ecalloc(1, times * block_size); in PHP_FUNCTION()
1353 memcpy( &key[i*block_size], digest, block_size); in PHP_FUNCTION()
1394 ZEND_SECURE_ZERO(hash->key, hash->ops->block_size); in php_hashcontext_dtor()
1430 newobj->key = ecalloc(1, newobj->ops->block_size); in php_hashcontext_clone()
1432 memcpy(newobj->key, oldobj->key, newobj->ops->block_size); in php_hashcontext_clone()