Brcrypt hashing for Quart.
Project description
Quart-Bcrypt
Quart-Bcrypt is a Quart extension that provides bcrypt hashing utilities for your application.
Due 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 one of the following commands:
pip 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. Use them like so:
pw_hash = bcrypt.generate_password_hash('hunter2')
bcrypt.check_password_hash(pw_hash, 'hunter2') # returns True
Alternatively there are async versions also. Use them like so:
pw_hash = await bcrypt.async_generate_password_hash('hunter2')
await bcrypt.async_check_password_hash(pw_hash, 'hunter2') # returns True
Documentation
Documentation is available here: https://quart-bcrypt.readthedocs.io/en/latest/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for Quart-Bcrypt-0.0.5.macosx-10.9-universal2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91ba1d997be891a7955d7876ea61778253cf7eeb825f2c872ac376c9b504e87a |
|
MD5 | de5493cf64d8a6776cffb600e54c7e37 |
|
BLAKE2b-256 | 56d6a27397e97eaae3e43fc8eb5b53093e972fc17f85254cba7a417dd70399f9 |
Hashes for Quart_Bcrypt-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 053e544727b6efbafca7d07c17eeabd970e360a7b6f0a3fa8854c04e5572feed |
|
MD5 | d9792c49e08328ddd9779572436ee54c |
|
BLAKE2b-256 | 919caab5a8554309dd63f8c86d8f0b20f61d043b1d2d7fe08e4b483a4df17354 |