`You can try with below method for payment encryption method to get value`,

You have to replace `\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,` with below class path, `\Magento\Payment\Gateway\ConfigInterface`
This is works fine,

    <?php
    
    namespace Vendor\Package\Block;
 
    class Test
    {
        protected $config;
    
        public function __construct(
            ..
            \Magento\Payment\Gateway\ConfigInterface $config
            ..
        ) {
            $this->config = $config;
        }
    
        public function getPaymentKey()
        {
            $key= $this->config->getValue('payment/webpay/keyid');
            echo $key;
        }
    
    }