I have an old application (built on .Net C#) includes Users table with hashed passwords sha1(password . salt)
, and I need to migrate this data safely to my new Rails application (which already encrypting passwords using bcrypt-ruby gem
) and looking for the best solution for this issue but with avoiding the following kind of solutions:
- Reset all current users' passwords and Force them to proceed 'Forget password' procedure
- Use any kind of plain text password (even temporarily while user login for first time into my new application for example).
- Use SHA1 same encryption procedure in Rails app also (I need to use BCrypt instead).
I think that the best approach (as I've read) is to let users log into my new app using their old passwords (and I don't know how to do it) and then encrypt their passwords (by BCrypt) and follow the same procedure of newly registered users' password encryption in Rails app.
I appreciate all suggested solutions to solve this issue.