https://github.com/quart-addons/quart-bcrypt
Quart-Bcrypt is a Quart extension that provides bcrypt hashing utilities for your application.
https://github.com/quart-addons/quart-bcrypt
bcrypt hash password quart
Last synced: 6 months ago
JSON representation
Quart-Bcrypt is a Quart extension that provides bcrypt hashing utilities for your application.
- Host: GitHub
- URL: https://github.com/quart-addons/quart-bcrypt
- Owner: Quart-Addons
- License: other
- Created: 2021-08-15T17:02:35.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-07T00:09:25.000Z (about 1 year ago)
- Last Synced: 2024-10-07T00:28:53.022Z (about 1 year ago)
- Topics: bcrypt, hash, password, quart
- Language: Python
- Homepage: https://quart-bcrypt.readthedocs.io
- Size: 3.01 MB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.rst
- License: LICENSE
Awesome Lists containing this project
README
# Quart-Bcrypt

Quart-Bcrypt is a Quart extension that provides bcrypt hashing utilities for
your application. Orginal code from Flash-Bcrypt, which can be found at
https://github.com/maxcountryman/flask-bcryptDue to the recent increased prevelance 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 the following command:
$ pip3 install quart-bcrypt
## Usage
To use the extension simply import the class wrapper and pass the Quart app
object back to here. Do so like this:from quart import Quart
from quart_bcrypt import Bcrypt
app = Quart(__name__)
bcrypt = Bcrypt(app)Two primary hashing methods are now exposed by way of the bcrypt object. Note that you
need to use decode('utf-8') on generate_password_hash().pw_hash = bcrypt.generate_password_hash('hunter2').decode('utf-8')
bcrypt.check_password_hash(pw_hash, 'hunter2') # returns True## Documentation
View documentation at https://quart-bcrypt.readthedocs.io/en/latest/