title: How to migrate Devise Rails Passwords to PHP
body: <p>We are in the process of moving a website from Ruby to PHP. We already have a users table where the passwords were generated by Devise.</p>
  
  <p>I am trying to find out how Devise stores the password in MySQL. Appears at first look to be a SHA encrypted with a salt, but I am not clear on how the salt is selected.</p>
  
  <p>I am trying to work the Devise code back to pseudo code so that we can the re write the code in PHP. Looking for help or suggestions with this.</p>
  
  <p>Trying to avoid resetting everybody's password, but depending on how well Devise stores passwords that might be the only option.</p>