bmb-crypto — Fast Cryptographic Functions
Standards-compliant hashing, encoding, and checksums compiled from BMB.
Installation
pip install bmb-crypto
Quick Start
import bmb_crypto
bmb_crypto.sha256("hello")
# '2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824'
bmb_crypto.md5("hello")
# '5d41402abc4b2a76b9719d911017c592'
bmb_crypto.hmac_sha256("key", "message")
# RFC 2104 compliant HMAC-SHA256
bmb_crypto.base64_encode("hello") # 'aGVsbG8='
bmb_crypto.base64_decode("aGVsbG8=") # 'hello'
bmb_crypto.crc32("hello") # '3610a686'
bmb_crypto.adler32("Wikipedia") # '11e60398'
Full API (14 functions)
| Function | Standard | Output |
|---|---|---|
sha256(data) |
FIPS 180-4 | 64-char hex |
md5(data) |
RFC 1321 | 32-char hex |
crc32(data) |
ISO 3309 | 8-char hex |
hmac_sha256(key, msg) |
RFC 2104 | 64-char hex |
base64_encode(data) |
RFC 4648 | Base64 string |
base64_decode(data) |
RFC 4648 | Original string |
base32_encode(data) |
RFC 4648 | Base32 string |
base32_decode(data) |
RFC 4648 | Original string |
adler32(data) |
RFC 1950 | 8-char hex |
fletcher16(data) |
Fletcher-16 | 4-char hex |
xor_checksum(data) |
XOR | 2-char hex |
rot13(data) |
ROT13 | Transformed string |
hex_encode(data) |
Hex | Hex string |
hex_decode(data) |
Hex | Original string |
All outputs cross-validated against Python's hashlib, binascii, hmac, and base64.
How?
Written in BMB — compile-time contracts prove correctness, then generate code faster than hand-tuned C.
License
MIT
Metadata
Release files for bmb-crypto 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bmb_crypto-0.3.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| bmb_crypto-0.3.0-py3-none-manylinux_2_17_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details |
| bmb_crypto-0.3.0-py3-none-macosx_15_0_universal2.whl | Python 3 | none | macOS 15.0+ universal2 (ARM64, x86-64) | Details |
Total release size: 238.4 kB
Release files / bmb_crypto-0.3.0-py3-none-win_amd64.whl
| Download URL | bmb_crypto-0.3.0-py3-none-win_amd64.whl |
|---|---|
| Size | 95.4 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9125a9eef1f6e3f922bfd934e3988562919fb5cfd57539bcdb4c34ead06071ea
|
|
BLAKE2b-256 checksum How to use checksums |
8618c4aaa3fa6a76f671261ab1823f70b751491c9d2abc34214502218ab53f1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / bmb_crypto-0.3.0-py3-none-manylinux_2_17_x86_64.whl
| Download URL | bmb_crypto-0.3.0-py3-none-manylinux_2_17_x86_64.whl |
|---|---|
| Size | 82.6 kB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
ef804ff194c5aea1b6f0d4b78782e923ae512e9062b8a6de7048eeab93960371
|
|
BLAKE2b-256 checksum How to use checksums |
b0e388e12a84c924c10c2cf14f5cae5b04768f6b445d314b2acbce6a99cea6f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / bmb_crypto-0.3.0-py3-none-macosx_15_0_universal2.whl
| Download URL | bmb_crypto-0.3.0-py3-none-macosx_15_0_universal2.whl |
|---|---|
| Size | 60.3 kB |
| Tags | Python 3 macOS 15.0+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
34f1d2d105f60d03a1b4c715b9e99d80b0b4579fca4d77e7aacc2b906483e0b4
|
|
BLAKE2b-256 checksum How to use checksums |
baf89f9bcf109bad6a10ce244dc149db07a9c6af9c059da3d6151f1b962f9f13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|