Skip to main content

Brcrypt hashing for Quart.

Project description

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

Coming Soon!

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.1.tar.gz (5.0 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.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file Quart-Bcrypt-0.0.1.tar.gz.

File metadata

  • Download URL: Quart-Bcrypt-0.0.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.0

File hashes

Hashes for Quart-Bcrypt-0.0.1.tar.gz
Algorithm Hash digest
SHA256 40f931cce184d53e67afa5a73f346020596e771863860ef29718d74427832824
MD5 f7bb060defff70b470da93870d7c0fe1
BLAKE2b-256 e21e4fa4edbdb4b60937ba48819649638b6c9b7aec415f2395f60fb043a8c71f

See more details on using hashes here.

File details

Details for the file Quart_Bcrypt-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: Quart_Bcrypt-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.0

File hashes

Hashes for Quart_Bcrypt-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f25ed8dd2bcda9b4dd4d74365ea6591890af5d5b171fd609ecbd0155c5d5cdc0
MD5 8c34bcf4c75e787a9d0de3f60e172083
BLAKE2b-256 10ac47a24fd8f4335be00dd8de516ca24a4f0b01d41fbb4264ffeee404e3accf

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