b3c32 (Python)
Compact, hand-writable, prefix-matchable XOF hashes and identities for anything.
This is the Python implementation of b3c32, and until otherwise stated it is the reference implementation: the contract artifacts at the project root are certified against it, and other language implementations are certified against the same frozen vectors. That status is expected to change once a native Rust implementation exists.
Codes are unkeyed BLAKE3 sliced on 40-bit boundaries, encoded as low-pad bitstream Crockford Base32. The result is short enough to write by hand, unambiguous enough to read aloud, and prefix-matchable so a truncated code still resolves.
Use
from b3c32 import hash_b32
code = hash_b32(b"hello", 120)
Width is in bits. 120 is the current certified width. This is not a ceiling on usefulness: slice the returned code at any multiple of 40 bits, which is 5 bytes or 8 characters, and the short form is a true string prefix of the long one. Store the full code, index a prefix.
The package also exports hash_digest for raw digest bytes, the codec
functions encode_crockford_b32, decode_crockford_b32, and
coerce_crockford_b32, the alphabet as CROCKFORD32_ALPHABET, and the
error types UncertifiedWidthError and CoercionError.
Consuming
Pin an exact version. The project is pre-1.0 and no compatibility
policy is in force, so any release may change the contract. Call
verify_conformance in your own suite to learn when it does:
from b3c32 import verify_conformance
def test_b3c32_contract():
verify_conformance()
It raises AssertionError naming the failed claim. Its scope is drift detection through the public API at the certified width; deep certification is this project's own suite against the pinned BLAKE3 reference vectors.
Status
Pre-release. Certification hardening is in progress. The full scheme definition, the normative conformance contract, and the frozen vectors live at the project root: https://github.com/marcus-grant/b3c32
Metadata
Release files for b3c32 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| b3c32-0.0.2.tar.gz | 27.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| b3c32-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.8 kB
Release files / b3c32-0.0.2.tar.gz
| Download URL | b3c32-0.0.2.tar.gz |
|---|---|
| Size | 27.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e90d405c7818f493f1dce87063e4eab34fb7b41f23bb7627608ae4dbaf12c2b
|
|
BLAKE2b-256 checksum How to use checksums |
9ecf1f1c28c205ea0788b03047eae7d858d2d5517646f78c28ec1b706a141df8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.
Transparency logRelease files / b3c32-0.0.2-py3-none-any.whl
| Download URL | b3c32-0.0.2-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d475049c99c3850fa74c638838667007823f4bcf32af2d7e9471a20fc27c4d1
|
|
BLAKE2b-256 checksum How to use checksums |
4aacab3be7662c2e52def97ffba8177c77557b05adf2d75c2b182a788f57767a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.
Transparency log