美狮贵宾会官网

美狮贵宾会官网(LianLian)官网首页

magento若何加密衔接

magento平台magento加密加密衔接
2020/12/22
自建站

Magento后盾配置设置的时辰有时辰必要加密保留,,,如一些关键的账号密码就不应该明文保留到数据库和显示在前台。!D敲茨阒magento若何加密衔接吗??

255518024106508395

<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 获取到的值是经过加密的,,,还必要解密能力用。! 解密代码$appSecret = Mage::helper('core')->decrypt($appSecret);;


配置文件中设置<frontend_type>password</frontend_type,,,前台能够看到字符。! frontend-type-password 不显示配置文件中设置<frontend_type>obscure</frontend_type>即可。!

更多
【网站地图】