Convert hashed password to string werkuzeug python
<p>I am using Werkzeug for password hashing so that the passwords entered by users will be safe(atleast).</p>

<p>Lets say my application is as follows:</p>

<p>When a user gets logged in I will use check_password_hash and then login the user inside.</p>

<p>After the user is logged in, I want to show them their password.</p>

<p>The problem I am encountering:</p>

<p>How do I convert the hashed password back to string to show the user their password?</p>

<p>My code is as follows:</p>

<pre><code>&gt;&gt;&gt; import werkzeug.security as ws
&gt;&gt;&gt; ws.generate_password_hash('abcdefg')
'pbkdf2:sha1:1000$fYAXLNA6$637528ae2fa195304c328d585e805b164f1c718f'
&gt;&gt;&gt; ws._hash_internal('pbkdf2:sha1:1000', 'fYAXLNA6', 'abcdefg')
('637528ae2fa195304c328d585e805b164f1c718f', 'pbkdf2:sha1:1000')
</code></pre>

<p>Now how do I convert this '6375.....'  back to 'abcdefg'? </p>

<p>I have access to database and the all the other stuff required. Basically I am the admin!</p>

<p>Note: I cannot use the password which user entered while logging in. I can only use the password from database.</p>

<blockquote>
  <p>After the user is logged in, I want to show them their password.</p>
</blockquote>

<p>The whole purpose and reason of hashing a password is that you can never do this. Not you, not anyone else. </p>

<p>If someone has access or steals the database with the list of passwords, converting the hash back to the original password is really, really expensive. You will need a million years to break and reverse one single password. </p>

python security hash werkzeug