CakePHP uses a Security class for hashing the passwords.
I am writing some examples below that will definitely help you out in understanding the different ways of password hashing in CakePHP:
echo "I am md5 CAKE:".Security::hash("dinesh","md5");
echo "I am SHA1CAKE:".Security::hash("dinesh");
echo "<br/>I am core:".md5("dinesh");
echo "<br/>I am core sha1:".sha1("dinesh");
exit;
For using the Security class you are not even required to change the salt value in app/config/core.php file.
Right now my salt value is:
Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi_1');
You are not needed to make it blank or comment the security.salt value.
Configure::write('Security.salt', '').
It will work perfectly.
I am md5 CAKE:9c9f1c65b1dc1f79498c9f09eb610e1a;
I am SHA1CAKE:d02f9eeeab3c10406e510f722877f8c6233e53cf
I am core:9c9f1c65b1dc1f79498c9f09eb610e1a
I am core sha1:d02f9eeeab3c10406e510f722877f8c6233e53cf
0 Comment(s)