Registry / auth-security / bcrypt

bcrypt

JSON →
library5.0.0pypypi✓ verified 34d ago

A Python library for modern password hashing, currently at version 5.0.0, with a release cadence of approximately every 6 months.

auth-security
Install & Compatibility
Where this runs
tested against v5.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.925 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.6MB
glibc
py 3.103.925 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Ensure 'bcrypt' is imported directly; avoid 'from bcrypt import *' to prevent namespace pollution.

import bcrypt

A simple example demonstrating how to hash and check passwords using bcrypt.

import bcrypt # Hash a password password = b"supersecret" salt = bcrypt.gensalt() hash = bcrypt.hashpw(password, salt) # Check a password if bcrypt.checkpw(password, hash): print("Password matches") else: print("Password does not match")
Debug
Known footguns
breakingPassing a password longer than 72 bytes to hashpw now raises a ValueError; previously, it was silently truncated.
deprecatedSupport for Python 3.7 has been dropped in version 4.3.0.
gotchabcrypt requires a C compiler and a Rust compiler (minimum supported Rust version is 1.56.0) for building from source.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
29 hits · last 30 days
bytedance
5
amazonbot
4
claudebot
4
gptbot
3
ahrefsbot
3
sogoubot
1
oai-searchbot
1
Resources