A lightweight Python utility library for generating hashes and verifying checksums for text, bytes, and files.
Project description
altrepo-hash
AltRepo Hash is a lightweight Python utility library for generating hashes and verifying checksums for text, bytes, and files.
Features
- Keep it simple and useful: Simple API with
hash_text(),hash_bytes(),hash_file(),verify_text_hash(),verify_file_hash(), andsupported_algorithms(). - Zero dependencies: Uses Python standard library only (
hashlib,hmac,pathlib,typing). - Supported algorithms:
md5,sha1,sha224,sha256,sha384,sha512,blake2b,blake2s,sha3_224,sha3_256,sha3_384,sha3_512.
Example API
from altrepo_hash import hash_text, hash_file, verify_file_hash
print(hash_text("hello", algorithm="sha256"))
print(hash_file("download.zip", algorithm="sha256"))
print(
verify_file_hash(
"download.zip",
expected_hash="abc123...",
algorithm="sha256"
)
)
Browser Version
AltRepo Hash is the Python companion to the browser-based hash tools on AltRepo.
More hash tools: https://altrepo.net/hash/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file altrepo_hash-0.1.0.tar.gz.
File metadata
- Download URL: altrepo_hash-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12ccb4f2b39607e00890c497b1c8682e6ee72a6c2a2bbb01a191b46a3b9ee39a
|
|
| MD5 |
f3139f5c739d89b3f2be8f7c0819e68c
|
|
| BLAKE2b-256 |
7a102461532b8708ce9f8e635c9403f1230ec3beaec6b4174306db236e0a4c72
|
File details
Details for the file altrepo_hash-0.1.0-py3-none-any.whl.
File metadata
- Download URL: altrepo_hash-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79aa6230b02903b33df397e62529c061db8a433f65374e9815435c9ff8a7db44
|
|
| MD5 |
164048f9b620223d81a988a915865876
|
|
| BLAKE2b-256 |
3d119a424a672dc812bbf8f2b5899432160dbe594d018c0755730905fbb94c61
|