Skip to main content

Quart-Bcrypt is a Quart extension that provides bcrypt hashing utilities for your application.

Project description

Quart-Bcrypt

Quart Bcrypt Logo

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-bcrypt

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 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/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quart-bcrypt-0.0.6.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quart_bcrypt-0.0.6-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file quart-bcrypt-0.0.6.tar.gz.

File metadata

  • Download URL: quart-bcrypt-0.0.6.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.4 Linux/5.10.76-linuxkit

File hashes

Hashes for quart-bcrypt-0.0.6.tar.gz
Algorithm Hash digest
SHA256 268c05f7dd6b987a8e5251046c5ff1790dfb7ae5e14f935edfa0c167b1d37c96
MD5 2b779f16874ee47b26e238eb6e226ff3
BLAKE2b-256 cbcea5e294f0ab71d0957ab2fa15768d1faa173877ce57ea311f26fd90812e5e

See more details on using hashes here.

File details

Details for the file quart_bcrypt-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: quart_bcrypt-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.4 Linux/5.10.76-linuxkit

File hashes

Hashes for quart_bcrypt-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a80debdb1315891089724bc2e609366627de0e6d75d0e6004bf3ce3b1f5fc218
MD5 0be56d05ccd94a11961e12975db80554
BLAKE2b-256 aee1acf6b1ff5b8ed61c7885c203be5fc115e9c5d22f9fa69b779525d9e8c326

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page