2 files were added to this release more than 14 days after its initial publication. Inspect the release files before installing.
bcrypt
Modern password hashing for your software and your servers
Installation
To install bcrypt, simply:
$ pip install bcrypt
Usage
Basic
Hashing and then later checking that a password matches the previous hashed password is very simple:
>>> import bcrypt
>>> password = b"super secret password"
>>> # Hash a password for the first time, with a randomly-generated salt
>>> hashed = bcrypt.hashpw(password, bcrypt.gensalt())
>>> # Check that a unhashed password matches one that has previously been
>>> # hashed
>>> if bcrypt.hashpw(password, hashed) == hashed:
... print("It Matches!")
... else:
... print("It Does not Match :(")
Adjustable Work Factor
One of bcrypt’s features is an adjustable logarithmic work factor. To adjust the work factor merely pass the desired number of rounds to bcrypt.gensalt(rounds=12) which defaults to 12):
>>> import bcrypt
>>> password = b"super secret password"
>>> # Hash a password for the first time, with a certain number of rounds
>>> hashed = bcrypt.hashpw(password, bcrypt.gensalt(14))
>>> # Check that a unhashed password matches one that has previously been
>>> # hashed
>>> if bcrypt.hashpw(password, hashed) == hashed:
... print("It Matches!")
... else:
... print("It Does not Match :(")
Adjustable Prefix
Another one of bcrypt’s features is an adjustable prefix to let you define what libraries you’ll remain compatible with. To adjust this, pass either 2a or 2b (the default) to bcrypt.gensalt(prefix=b"2b") as a bytes object.
Compatibility
This library should be compatible with py-bcrypt and it will run on Python 2.6+, 3.2+, and PyPy.
Security
bcrypt follows the same security policy as cryptography, if you identify a vulnerability, we ask you to contact us privately.
Release files for bcrypt 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Files added late
2 files were uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release files before installing.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bcrypt-2.0.0.tar.gz | 38.7 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| bcrypt-2.0.0-cp35-none-win_amd64.whl | CPython 3.5 | none | Windows x86-64 | Details |
| bcrypt-2.0.0-cp35-none-win32.whl | CPython 3.5 | none | Windows x86-32 | Details |
| bcrypt-2.0.0-cp34-none-win_amd64.whl | CPython 3.4 | none | Windows x86-64 | Details |
| bcrypt-2.0.0-cp34-none-win32.whl | CPython 3.4 | none | Windows x86-32 | Details |
| bcrypt-2.0.0-cp33-none-win_amd64.whl | CPython 3.3 | none | Windows x86-64 | Details |
| bcrypt-2.0.0-cp33-none-win32.whl | CPython 3.3 | none | Windows x86-32 | Details |
| bcrypt-2.0.0-cp32-none-win_amd64.whl | CPython 3.2 | none | Windows x86-64 | Details |
| bcrypt-2.0.0-cp32-none-win32.whl | CPython 3.2 | none | Windows x86-32 | Details |
| bcrypt-2.0.0-cp27-none-win_amd64.whl | CPython 2.7 | none | Windows x86-64 | Details |
| bcrypt-2.0.0-cp27-none-win32.whl | CPython 2.7 | none | Windows x86-32 | Details |
| bcrypt-2.0.0-cp26-none-win_amd64.whl | CPython 2.6 | none | Windows x86-64 | Details |
| bcrypt-2.0.0-cp26-none-win32.whl | CPython 2.6 | none | Windows x86-32 | Details |
Total release size: 264.5 kB
Release files / bcrypt-2.0.0.tar.gz
| Download URL | bcrypt-2.0.0.tar.gz |
|---|---|
| Size | 38.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b2d197ef220d10eb74625dde7af3b10daa973ae9a1eadd6366f763fad4387fa
|
|
BLAKE2b-256 checksum How to use checksums |
117d4c7980d04314466de42ea804db71995c9b3a2a47dc79a63c51f1be0cfd50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / bcrypt-2.0.0-cp35-none-win_amd64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | bcrypt-2.0.0-cp35-none-win_amd64.whl |
|---|---|
| Size | 21.0 kB |
| Tags | CPython 3.5 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
562d1198237756ebf02e08861157aeb8e5500458e11580227360e8b4a7ab0e98
|
|
BLAKE2b-256 checksum How to use checksums |
8273a5b8c40b410005c229b91c5b600713a91d73770f17a5cd3df68c743101c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / bcrypt-2.0.0-cp35-none-win32.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | bcrypt-2.0.0-cp35-none-win32.whl |
|---|---|
| Size | 19.1 kB |
| Tags | CPython 3.5 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
5c5215bbe772b8c308cf12e555230d0ab5e25a3c17e451839e426415b724dfcc
|
|
BLAKE2b-256 checksum How to use checksums |
4306f9a1568844b4635766a1099258d72c6f997d367453090405313205b98086
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / bcrypt-2.0.0-cp34-none-win_amd64.whl
| Download URL | bcrypt-2.0.0-cp34-none-win_amd64.whl |
|---|---|
| Size | 18.7 kB |
| Tags | CPython 3.4 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
dde11b4c211338af1c515e22e6f8a6358a188568d6ce92c4cbf4ded584c80bc7
|
|
BLAKE2b-256 checksum How to use checksums |
7e5a678a85b8e5a89e3f960be2ac03399c62e927c4b23ba7d6a577b62cc092ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / bcrypt-2.0.0-cp34-none-win32.whl
| Download URL | bcrypt-2.0.0-cp34-none-win32.whl |
|---|---|
| Size | 18.3 kB |
| Tags | CPython 3.4 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
c37f46a59d448b18cea4a96d16f37e38ca4ca5724c277e658f367c2bcbbf3484
|
|
BLAKE2b-256 checksum How to use checksums |
a04ab4d27c01e3e4441686dde5c4c67947e060e4b32dfdc067f19bece555dc59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / bcrypt-2.0.0-cp33-none-win_amd64.whl
| Download URL | bcrypt-2.0.0-cp33-none-win_amd64.whl |
|---|---|
| Size | 18.7 kB |
| Tags | CPython 3.3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e597c26011b144c5fd7ad6bdc560241195f95f86d589abe9833a2d4bd9a66a69
|
|
BLAKE2b-256 checksum How to use checksums |
6817f9e6f6164eda56c1a41dd5f8c92fbc5ec2622e40daf545809c83589944ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / bcrypt-2.0.0-cp33-none-win32.whl
| Download URL | bcrypt-2.0.0-cp33-none-win32.whl |
|---|---|
| Size | 18.3 kB |
| Tags | CPython 3.3 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
2d602d691811458f6fd97096aed5537ccd0029e13220afcc2c767db84502adfe
|
|
BLAKE2b-256 checksum How to use checksums |
6b9a9da82b58af691910de5c7fb7c0365f5776df7143971385e1044e87cab00e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / bcrypt-2.0.0-cp32-none-win_amd64.whl
| Download URL | bcrypt-2.0.0-cp32-none-win_amd64.whl |
|---|---|
| Size | 18.6 kB |
| Tags | CPython 3.2 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
01ae55ea4b8430567662906561cc7d5605dc0d0230a71f9e5d34ce1c91dab9b4
|
|
BLAKE2b-256 checksum How to use checksums |
4a80124453d670d93b35521685a20e3e99b13d09c7462ab102b3179f9196f27d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / bcrypt-2.0.0-cp32-none-win32.whl
| Download URL | bcrypt-2.0.0-cp32-none-win32.whl |
|---|---|
| Size | 18.3 kB |
| Tags | CPython 3.2 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
75bb8083bc6f32f05a4fe8b0393874f6801b6a3f366fbf8bc03387a0baedc04e
|
|
BLAKE2b-256 checksum How to use checksums |
2900a48322ecf591b44aec9bac53ed95a828c6910e633eb078c4a8ae9cb64aaf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / bcrypt-2.0.0-cp27-none-win_amd64.whl
| Download URL | bcrypt-2.0.0-cp27-none-win_amd64.whl |
|---|---|
| Size | 18.7 kB |
| Tags | CPython 2.7 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
c512747c10873976e5ebf9419a76bf5be76ff0e4a624e31ca0d4daa0e9348f33
|
|
BLAKE2b-256 checksum How to use checksums |
e0a6601bac7069e87d4836bc874691be55d65acf8d3c70f3d3650d7b24c51ef1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / bcrypt-2.0.0-cp27-none-win32.whl
| Download URL | bcrypt-2.0.0-cp27-none-win32.whl |
|---|---|
| Size | 18.3 kB |
| Tags | CPython 2.7 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
42e39d6dd11b961856d431006f09f66f00af856bfc9cc50269e8bdd6af4586a3
|
|
BLAKE2b-256 checksum How to use checksums |
28bf5146c0b8a61073c7f44b993f85e50261fb012cf8cb8624f109f9a2905c15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / bcrypt-2.0.0-cp26-none-win_amd64.whl
| Download URL | bcrypt-2.0.0-cp26-none-win_amd64.whl |
|---|---|
| Size | 19.0 kB |
| Tags | CPython 2.6 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
5c78e0416f6372722314aa33bbf944d361aef37870bf57f757960846b52d0fb7
|
|
BLAKE2b-256 checksum How to use checksums |
a191c0cbc96069bcaf79879ab63c9a79cc49048e5bde76aa719a2295219918e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / bcrypt-2.0.0-cp26-none-win32.whl
| Download URL | bcrypt-2.0.0-cp26-none-win32.whl |
|---|---|
| Size | 18.6 kB |
| Tags | CPython 2.6 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
453bc7cc2d8d808d8ef06bfeca6db230e4de975d7df17d43cc5f8a738ac89691
|
|
BLAKE2b-256 checksum How to use checksums |
40cfb97593bb539f2ade1d154a43b03d87813df78b88749492907899cf2a7f02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |