Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Problem with password encryption when moving from core php to cakePHP

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 331
    Comment on it

    Hi all,

    I had a requirement to move a project from core php to cakePHP framework. Migrating code was clear as I had to just modify syntax of code-base. But the problem came, when I had to implement login authentication with username and password using Auth component. In existing project, it was SHA1 so I also made changes like:

    Security::setHash('sha1');
    

    But still I was getting difference between encryption code for password. After some googling I found that cakePHP uses salt value with encryption techniques, So I went to app/config/core.php and commented following line:

    //Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mis');
    

    After that everything is working fine. Hope this will help someone.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: