Skip to main content

Python wrapper for bcrypt

Project description

Bcrypt is an implementation of a modern password hashing algorithm, based on the Blowfish block cipher, by Niels Provos and David Mazieres. It has been the default password scheme since OpenBSD 2.1.

A paper on the algorithm that explains its design decisions is available here:

http://www.usenix.org/events/usenix99/provos.html

The most important property of bcrypt is that it is adaptable to future processor performance improvements, allowing you to arbitrarily increase the processing cost of checking a password while still maintaining compatibility with your older password hashes.

This package provides a high level object oriented wrapper around bcrypt, as well as low level bindings to the C library. It uses the random number generator random.SystemRandom() to create the salts.

Use

Typical usage:

import bcryptor

hasher = bcryptor.Bcrypt()
hash = hasher.create('crack my pass')

And to validate:

>>> hasher.valid('crack my pass', hash)
True
>>> hasher.valid('Crack my pass', hash)
False

Change history

v1.2, 2010-02-24

  • The license has been changed to ISC.

  • For indentation, is used 4 spaces as is indicated in PEP-8.

  • The manage of exceptions and imports has been improved.

  • Better docstrings.

  • The values of cost can be changed at instancing Bcrypt().

  • Changed from Pyrex to Cython.

  • The logging is managed through Yamlog.

v1.1, 2009-05-20

  • Initial release.

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

Bcryptor-1.2.tar.gz (110.6 kB view details)

Uploaded Source

File details

Details for the file Bcryptor-1.2.tar.gz.

File metadata

  • Download URL: Bcryptor-1.2.tar.gz
  • Upload date:
  • Size: 110.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Bcryptor-1.2.tar.gz
Algorithm Hash digest
SHA256 73e81d459d1864e6a7845606ad731f314d700fd6bbf92729e12e72e06b1ddb74
MD5 54ef592cfc0077689f9310637a6eb9ab
BLAKE2b-256 c308524dbfdb0e1ded1e2ef6bf238e8672cc261d4431d9e4dca97057591653ff

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