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.9.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

quart_bcrypt-0.0.9-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file quart_bcrypt-0.0.9.tar.gz.

File metadata

  • Download URL: quart_bcrypt-0.0.9.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Linux/6.10.4-linuxkit

File hashes

Hashes for quart_bcrypt-0.0.9.tar.gz
Algorithm Hash digest
SHA256 b869a7298de6a19cc78f183ff760a79ca38067ca97d3fb8cd4760db9d60b78d9
MD5 51928dbc1d27e5f0378594365902d165
BLAKE2b-256 b8df8110d19ef99019e30a54dd610f298a77140fbfd57187b13bfd637cca3534

See more details on using hashes here.

File details

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

File metadata

  • Download URL: quart_bcrypt-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Linux/6.10.4-linuxkit

File hashes

Hashes for quart_bcrypt-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 f541c5eba1ca48269f4e2ba5aad8c4d0bcbb833b355164adbbf0c63dedee999b
MD5 80f1e7458513177e2ec87e7d7725512c
BLAKE2b-256 131abdac9d67bda4474cc9f3e1c8c6d9acaaa435e06282b9ddfe9ed4f24baea0

See more details on using hashes here.

Supported by

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