Security.salt value in controller

风流意气都作罢 提交于 2019-12-07 18:09:25

Just try like this

Configure::read('Security.salt');

it will give you the value. For more info check here

Stephan

The above answers have not proven to be successful in CakePHP3.

Configure::Read('Security.salt') will return a blank value.

In-order to read the salt from the configuration file you'll need to include the Security namespace:

use Cake\Utility\Security;

And you can retrieve the value of the salt using:

Security::salt()

Configure::read("Security.salt");
cakedev

You can get Security.salt value from below given url

http://www.sethcardoza.com/tools/random-password-generator/

Use 40 char long Salt

Configure::write('Security.salt','#IDjVn^BeZQ_kK)V5oFzk#s&8LSq44zVqN36SP^T');

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!