title: PHP BCrypt for Ruby on Rails Devise passwords
body: <p>I am trying to verify with PHP some passwords generated by Devise Ruby on Rails.
  Devise was configured to use bcrypt.</p>
  
  <p>My code is:</p>
  
  <pre><code>$database_record = "$2a$10$..."; // generated by devise
  $user_input = 'asdasd';
  $password = crypt($user_input, '$2a$10$usesomesillystringforsalt$');
  
  if (crypt($user_input, $database_record) == $password) {
      echo "&lt;br/&gt;Password verified!";
  }
  else {
      echo '&lt;br/&gt;failed!'; }
  </code></pre>
  
  <p>The documentation that I saw are using this method, but it doesn't work for me. Am I forgetting something?
  The "pepper string" should be used in any way?
  Thanks!</p>