Lines Matching refs:block_size

468 	memset(K, 0, ops->block_size);  in php_hash_hmac_prep_key()
469 if (key_len > ops->block_size) { in php_hash_hmac_prep_key()
478 php_hash_string_xor_char(K, K, 0x36, ops->block_size); in php_hash_hmac_prep_key()
483 ops->hash_update(context, key, ops->block_size); in php_hash_hmac_round()
517 K = emalloc(ops->block_size); in php_hash_do_hash_hmac()
526 ops->hash_update(context, K, ops->block_size); in php_hash_do_hash_hmac()
543 php_hash_string_xor_char(K, K, 0x6A, ops->block_size); in php_hash_do_hash_hmac()
548 ZEND_SECURE_ZERO(K, ops->block_size); in php_hash_do_hash_hmac()
643 char *K = emalloc(ops->block_size); in PHP_FUNCTION()
644 size_t i, block_size; in PHP_FUNCTION() local
646 memset(K, 0, ops->block_size); in PHP_FUNCTION()
648 if (ZSTR_LEN(key) > ops->block_size) { in PHP_FUNCTION()
659 block_size = ops->block_size; in PHP_FUNCTION()
660 for(i = 0; i < block_size; i++) { in PHP_FUNCTION()
663 ops->hash_update(context, (unsigned char *) K, ops->block_size); in PHP_FUNCTION()
786 size_t i, block_size; in PHP_FUNCTION() local
789 block_size = hash->ops->block_size; in PHP_FUNCTION()
790 for(i = 0; i < block_size; i++) { in PHP_FUNCTION()
796 hash->ops->hash_update(hash->context, hash->key, hash->ops->block_size); in PHP_FUNCTION()
801 ZEND_SECURE_ZERO(hash->key, hash->ops->block_size); in PHP_FUNCTION()
919 K = emalloc(ops->block_size); in PHP_FUNCTION()
925 php_hash_string_xor_char(K, K, 0x6A, ops->block_size); in PHP_FUNCTION()
927 ZEND_SECURE_ZERO(K, ops->block_size); in PHP_FUNCTION()
939 ops->hash_update(context, K, ops->block_size); in PHP_FUNCTION()
951 php_hash_string_xor_char(K, K, 0x6A, ops->block_size); in PHP_FUNCTION()
960 ZEND_SECURE_ZERO(K, ops->block_size); in PHP_FUNCTION()
1012 K1 = emalloc(ops->block_size); in PHP_FUNCTION()
1013 K2 = emalloc(ops->block_size); in PHP_FUNCTION()
1020 php_hash_string_xor_char(K2, K1, 0x6A, ops->block_size); in PHP_FUNCTION()
1073 ZEND_SECURE_ZERO(K1, ops->block_size); in PHP_FUNCTION()
1074 ZEND_SECURE_ZERO(K2, ops->block_size); in PHP_FUNCTION()
1314 size_t block_size = ops->digest_size; in PHP_FUNCTION() local
1315 size_t times = bytes / block_size; in PHP_FUNCTION()
1317 if ((bytes % block_size) != 0) { in PHP_FUNCTION()
1324 key = ecalloc(1, times * block_size); in PHP_FUNCTION()
1336 memcpy( &key[i*block_size], digest, block_size); in PHP_FUNCTION()
1377 ZEND_SECURE_ZERO(hash->key, hash->ops->block_size); in php_hashcontext_dtor()
1403 newobj->key = ecalloc(1, newobj->ops->block_size); in php_hashcontext_clone()
1405 memcpy(newobj->key, oldobj->key, newobj->ops->block_size); in php_hashcontext_clone()