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>

<p>We cannot get the original text back while using hashing. Generally all the passwords are stored as hash value, in order to make the passwords private (known only to the user). All the servers implement this. If you want to get the password back then you should use symmetric key cryptography. Where a secret key will be shared between the clients and the server <strong>(But it is a very bad practice)</strong> It better that you go with hashing.</p>

python security hash werkzeug