

magento如何加密連接
Magento后臺(tái)配置設(shè)置的時(shí)候有時(shí)候須要加密保留,如一些癥結(jié)的賬號(hào)密碼就不應(yīng)當(dāng)明文保留到數(shù)據(jù)庫和顯示在前臺(tái)。那么你知道m(xù)agento如何加密銜接嗎?
<app_secret translate="label">
<label>app_secret</label>
<frontend_type>password</frontend_type>
<backend_model>adminhtml/system_config_backend_encrypted</backend_model>
<sort_order>2</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
</app_secret>
獲取值得代碼 $appSecret = Mage::getStoreConfig('facebook_login/setting/app_secret', $storeId);
直接拿getStoreConfig 獲取到的值是經(jīng)過加密的,還須要解密能力用。 解密代碼$appSecret = Mage::helper('core')->decrypt($appSecret);
配置文件中設(shè)置<frontend_type>password</frontend_type,前臺(tái)可以看到字符。 frontend-type-password 不顯示配置文件中設(shè)置<frontend_type>obscure</frontend_type>即可。
特別聲明:以上文章內(nèi)容僅代表作者本人觀點(diǎn),不代表ESG跨境電商觀點(diǎn)或立場。如有關(guān)于作品內(nèi)容、版權(quán)或其它問題請(qǐng)于作品發(fā)表后的30日內(nèi)與ESG跨境電商聯(lián)系。
二維碼加載中...
使用微信掃一掃登錄
使用賬號(hào)密碼登錄
平臺(tái)顧問
微信掃一掃
馬上聯(lián)系在線顧問
小程序
ESG跨境小程序
手機(jī)入駐更便捷
返回頂部