本文整理汇总了PHP中Magento\Framework\Encryption\EncryptorInterface::decrypt方法的典型用法代码示例。如果您正苦于以下问题:PHP EncryptorInterface::decrypt方法的具体用法?PHP EncryptorInterface::decrypt怎么用?PHP EncryptorInterface::decrypt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Framework\Encryption\EncryptorInterface
的用法示例。
在下文中一共展示了EncryptorInterface::decrypt方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(ClientInterface $client, OpenpayExceptionMapper $exceptionMapper, OpenpayFeeValidator $validator, OpenpayTransactionMapper $transactionMapper, EncryptorInterface $encryptor, ScopeConfigInterface $config)
{
$paymentOpenpayConfig = $config->getValue('payment/openpay');
$paymentOpenpayConfig['merchantId'] = $encryptor->decrypt($paymentOpenpayConfig['merchantId']);
$paymentOpenpayConfig['apiKey'] = $encryptor->decrypt($paymentOpenpayConfig['apiKey']);
$paymentOpenpayConfig['publicKey'] = $encryptor->decrypt($paymentOpenpayConfig['publicKey']);
parent::__construct($client, $exceptionMapper, $validator, $transactionMapper, $paymentOpenpayConfig);
}
示例2: get
/**
* {@inheritdoc}
*/
public function get($storeId = null)
{
/** @var CredentialsInterface $credentials */
$credentials = $this->credentialsFactory->create();
$configValues = $this->scopeConfig->getValue(self::PAYMENT_OPENPAY_PATH, \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $storeId);
$merchantId = $this->encryptor->decrypt($configValues['merchantId']);
$publicKey = $this->encryptor->decrypt($configValues['publicKey']);
$credentials->setMerchantId($merchantId)->setPublicKey($publicKey)->setIsSandboxMode($configValues['sandbox']);
return $credentials;
}
示例3: _createCertFile
/**
* Create physical certificate file based on DB data
*
* @param string $file
* @return void
*/
protected function _createCertFile($file)
{
if ($this->varDirectory->isDirectory(self::BASEPATH_PAYPAL_CERT)) {
$this->_removeOutdatedCertFile();
}
$this->varDirectory->writeFile($file, $this->encryptor->decrypt($this->getContent()));
}
示例4: getWsPassword
/**
* @desc Retrieve the webserver password
* @return string
*/
public function getWsPassword()
{
if ($this->isDemoMode()) {
$wsPassword = $this->_encryptor->decrypt(trim($this->getAdyenAbstractConfigData('ws_password_test')));
} else {
$wsPassword = $this->_encryptor->decrypt(trim($this->getAdyenAbstractConfigData('ws_password_live')));
}
return $wsPassword;
}
示例5: _reEncryptCreditCardNumbers
/**
* Gather saved credit card numbers from sales order payments and re-encrypt them
*
* @return void
*/
protected function _reEncryptCreditCardNumbers()
{
$table = $this->getTable('sales_order_payment');
$select = $this->getConnection()->select()->from($table, ['entity_id', 'cc_number_enc']);
$attributeValues = $this->getConnection()->fetchPairs($select);
// save new values
foreach ($attributeValues as $valueId => $value) {
$this->getConnection()->update($table, ['cc_number_enc' => $this->encryptor->encrypt($this->encryptor->decrypt($value))], ['entity_id = ?' => (int) $valueId]);
}
}
示例6: getBackendCfg
public function getBackendCfg()
{
$cfg = [];
$cfg['key'] = $this->_encryptor->decrypt($this->_escaper->escapeHtml($this->scopeConfig->getValue('cc_uk/main_options/backend_accesstoken', \Magento\Store\Model\ScopeInterface::SCOPE_STORE)));
$cfg['enabled'] = $this->scopeConfig->isSetFlag('cc_uk/main_options/backend_enabled', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
$cfg['auto_search'] = $this->scopeConfig->isSetFlag('cc_uk/gfx_options/searchbar_auto_search', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
$cfg['clean_postsearch'] = $this->scopeConfig->isSetFlag('cc_uk/gfx_options/searchbar_clean_postsearch', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
$cfg['searchbar_type'] = $this->_escaper->escapeHtml($this->scopeConfig->getValue('cc_uk/gfx_options/searchbar_type', \Magento\Store\Model\ScopeInterface::SCOPE_STORE));
$cfg['error_msg'] = [];
$cfg['error_msg']["0001"] = $this->_escaper->escapeHtml($this->scopeConfig->getValue('cc_uk/txt_options/error_msg_1', \Magento\Store\Model\ScopeInterface::SCOPE_STORE));
$cfg['error_msg']["0002"] = $this->_escaper->escapeHtml($this->scopeConfig->getValue('cc_uk/txt_options/error_msg_2', \Magento\Store\Model\ScopeInterface::SCOPE_STORE));
$cfg['error_msg']["0003"] = $this->_escaper->escapeHtml($this->scopeConfig->getValue('cc_uk/txt_options/error_msg_3', \Magento\Store\Model\ScopeInterface::SCOPE_STORE));
$cfg['error_msg']["0004"] = $this->_escaper->escapeHtml($this->scopeConfig->getValue('cc_uk/txt_options/error_msg_4', \Magento\Store\Model\ScopeInterface::SCOPE_STORE));
$cfg['txt'] = [];
$cfg['txt']["search_label"] = $this->_escaper->escapeHtml($this->scopeConfig->getValue('cc_uk/txt_options/search_label', \Magento\Store\Model\ScopeInterface::SCOPE_STORE));
$cfg['txt']["search_placeholder"] = $this->_escaper->escapeHtml($this->scopeConfig->getValue('cc_uk/txt_options/search_placeholder', \Magento\Store\Model\ScopeInterface::SCOPE_STORE));
$cfg['txt']["search_buttontext"] = $this->_escaper->escapeHtml($this->scopeConfig->getValue('cc_uk/txt_options/search_buttontext', \Magento\Store\Model\ScopeInterface::SCOPE_STORE));
return json_encode($cfg);
}
示例7: decrypt
/**
* Decrypt data
*
* @param string $data
* @return string
*/
public function decrypt($data)
{
return $this->_encryptor->decrypt($data);
}
示例8: processValue
/**
* Process config value
*
* @param string $value
* @return string
*/
public function processValue($value)
{
return $this->_encryptor->decrypt($value);
}
示例9: decryptPassword
/**
* Decrypt password
*
* @param string $password
* @return string
*/
public function decryptPassword($password)
{
return $this->_encryptor->decrypt($password);
}
示例10: getAccountPassword
/**
* Google Account password
*
* @param int $storeId
* @return string
*/
public function getAccountPassword($storeId = null)
{
return $this->_encryptor->decrypt($this->getConfigData('password', $storeId));
}
示例11: getInsightsInsertKey
/**
* Returns configured Insights insert key for New Relic events related to cron jobs
*
* @return string
*/
public function getInsightsInsertKey()
{
return $this->encryptor->decrypt($this->scopeConfig->getValue('newrelicreporting/general/insights_insert_key'));
}