I am planning to upgrade my rails application from 2.3.5 to 4.1.
In old version of rails bcrypt-ruby had two fields(hashed_password, salt).
Now In latest version of rails we have only single field called password_digest.
Now I need to upgrade existing users passwords from hashed_password, salt to password_digest field.
So I am planning is there any process or algorithm for migrating existing user passwords.
Example:
1) hashed_password: d83894e27821bd43eeb7a0001037329e1ddfe28a 2) salt: 701260468044000.6918523640121411
now we need to change to
3) password_digest : 666699d998933300.6918d83894e2782e1ddfe28a
Now if user is login with his password it should allow to login.
Note: I am not using any authentication gems like authlogic or devise. I am using plain rails authentication using bcrypt-ruby