Skip to Content
Mastering Flask Web Development - Second Edition
book

Mastering Flask Web Development - Second Edition

by Daniel Gaspar, Jack Stouffer
October 2018
Intermediate to advanced
332 pages
8h 9m
English
Packt Publishing
Content preview from Mastering Flask Web Development - Second Edition

Updating the models

There are many hashing algorithms, most of which are not secure because they are easy to brute force. With brute-force attacks, hackers continuously try sending data through a hashing algorithm until something matches. To best protect the user passwords, bcrypt will be our hashing algorithm of choice. Bcrypt is purposely designed to be inefficient and slow (milliseconds rather than microseconds) for the computer to process, thereby making it harder to brute force. To add bcrypt to our project, the package flask-bcrypt will need to be installed and added as a dependency on our requirements.txt, as follows:

...flask-bcrypt...

The flask-bcrypt package will have to be initialized. This is done in the auth module, auth/__

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Flask Web Development, 2nd Edition

Flask Web Development, 2nd Edition

Miguel Grinberg
Flask Web Development

Flask Web Development

Miguel Grinberg

Publisher Resources

ISBN: 9781788995405Supplemental Content