Skip to main content

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.

Installation

To build the module from source code, read documentation on doc/source.txt.

Logging

Yamlog manages the error catching code and error reporting. Read its documentation if want to be set up.

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.2, 2010-02-26

  • Fixed an import error at loading the package to get its docstring. It doesn’t works when is imported a module generated by cython which has not built.

v1.2.1, 2010-02-25

  • Added a null handler to logging, since Yamlog could not has been set up.

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.

Metadata

Release files for Bcryptor 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Bcryptor 1.2.2
File Size Uploaded
Bcryptor-1.2.2.tar.gz 111.3 kB Details

Release files / Bcryptor-1.2.2.tar.gz

Download URL Bcryptor-1.2.2.tar.gz
Size 111.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5eebe432ab30bd706e9456184a908ce8754de6921d416d9e61b258573d14b6b3
BLAKE2b-256 checksum
How to use checksums
d5257a9ce889f4988cc30aa656d7eed659f21fd7114b32ef50327d9cc5fef652
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.2.2 This release

1 release file

1.2.1

1 release file

1.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page