Flask-Bcrypt
Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application.
Due to the recent increased prevalence of powerful hardware, such as modern GPUs, hashes have become increasingly easy to crack. A proactive solution to this is to use a hash that was designed to be "de-optimized". Bcrypt is such a hashing facility; unlike hashing algorithms such as MD5 and SHA1, which are optimized for speed, bcrypt is intentionally structured to be slow.
For sensitive data that must be protected, such as passwords, bcrypt is an advisable choice.
Installation
Install the extension with one of the following commands:
$ easy_install flask-bcrypt
or alternatively if you have pip installed:
$ pip install flask-bcrypt
Usage
To use the extension simply import the class wrapper and pass the Flask app object back to here. Do so like this:
from flask import Flask
from flask_bcrypt import Bcrypt
app = Flask(__name__)
bcrypt = Bcrypt(app)
Two primary hashing methods are now exposed by way of the bcrypt object. Use them like so:
pw_hash = bcrypt.generate_password_hash('hunter2')
bcrypt.check_password_hash(pw_hash, 'hunter2') # returns True
Documentation
The Sphinx-compiled documentation is available here: https://flask-bcrypt.readthedocs.io/
Metadata
Release files for Flask-Bcrypt 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Flask-Bcrypt-1.0.1.tar.gz | 6.0 kB | Without provenance | Details for Flask-Bcrypt-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| Flask_Bcrypt-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for Flask_Bcrypt-1.0.1-py3-none-any.whl |
Total release size: 12.0 kB
Release files / Flask-Bcrypt-1.0.1.tar.gz
| Download URL | Flask-Bcrypt-1.0.1.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f07b66b811417ea64eb188ae6455b0b708a793d966e1a80ceec4a23bc42a4369
|
|
BLAKE2b-256 checksum How to use checksums |
0cf425dccfafad391d305b63eb6031e7c1dbb757169d54d3a73292939201698e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.13
|
Release files / Flask_Bcrypt-1.0.1-py3-none-any.whl
| Download URL | Flask_Bcrypt-1.0.1-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
062fd991dc9118d05ac0583675507b9fe4670e44416c97e0e6819d03d01f808a
|
|
BLAKE2b-256 checksum How to use checksums |
8b72af9a3a3dbcf7463223c089984b8dd4f1547593819e24d57d9dc5873e04fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.13
|
Security for Flask-Bcrypt 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.