title: Can I decrypt a Bcrypt hashed password with werkzeug.security's check_password_hash
body: <p>Is it possible to decrypt previously hashed passwords using:</p>
  
  <p><code>Bcrypt - $2b$12$</code></p>
  
  <p>while using:</p>
  
  <p><code>from werkzeug.security import generate_password_hash, check_password_hash</code></p>
  
  <p>I am kind of assuming that if I can specify which hashing algorithm <code>werkzeug.security</code> should use to check the password, then it would work even though they are different tools. </p>
  
  <p>Perhaps I am being naive. </p>
  
  <p>I encrypted the passwords like so:</p>
  
  <pre><code>application = Flask(__name__)
  bc = Bcrypt(application)
  password=bc.generate_password_hash(data['password_input'])
  </code></pre>
  
  <p>But would like to decrypt like so:</p>
  
  <pre><code>application = Flask(__name__)
  from werkzeug.security import generate_password_hash, check_password_hash
  if check_password_hash(user.password, password):
      pass
  </code></pre>
  
  <p>Sample (dummy) hash:</p>
  
  <pre><code>$2b$12$98WSJfIg.YkR/Bn469IX4OlOCJx.HMWKxR8NysSynGa8QHf/4rawq
  </code></pre>
  
  <p>I would use the Bcrypt library but I haven't been able to get it to work with Elastic Beanstalk, due to <a href="http://stackoverflow.com/questions/41854768/flask-bcrypt-attributeerror-module-object-has-no-attribute-ffi-deployed">http://stackoverflow.com/questions/41854768/flask-bcrypt-attributeerror-module-object-has-no-attribute-ffi-deployed</a>.</p>