Flask: Secure password the with werkzeug hashing


Werkzeug started is a simple collection of various utilities for WSGI applications and it becomes one of the most advanced WSGI utility modules in Python and is used to build many advanced frameworks such as Flask.

Here is how you can use Werkzeug hashing in your apps. In order to do this, you may need the following import statement.

from werkzeug.security import generate_password_hash, check_password_hash

The hashing is simplified with generate function.

hash_password = generate_password_hash(form.password.data, method='sha256')

The check password method will validate the input. In both cases, you can see the URL contain the hash strings instead of the regular password string.

For more help Please refer, 

https://pypi.python.org/pypi/Werkzeug/

Click to access werkzeug.pdf

http://werkzeug.pocoo.org/

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.