altrepo-hash
AltRepo Hash is a lightweight Python utility library for generating hashes and verifying checksums for text, bytes, and files.
Features
- Straightforward API: Easily generate hashes or verify checksums with a clean, intuitive interface.
- Zero Dependencies: Built entirely on top of Python's standard library, ensuring a lightweight footprint with no external requirements.
- Secure Verifications: Utilizes constant-time comparisons (
hmac.compare_digest) to securely verify file and text hashes. - Broad Algorithm Support: Includes built-in support for all major hashing algorithms including
sha256,sha512,sha3_256,blake2b,blake2s,md5,sha1, and more. - Memory Efficient: Safely processes large files in chunks via
hash_filewithout loading the entire file into memory.
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/
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
altrepo_hash-0.1.1.tar.gz
(4.3 kB
view details)
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.1.tar.gz.
File metadata
- Download URL: altrepo_hash-0.1.1.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c7590860d222f32f8d91e9bff2044a787a117b9b42bbb9cf23755420c064dfb
|
|
| MD5 |
9f489d61fec78fb52d942f022c8a7954
|
|
| BLAKE2b-256 |
d1b77608d9848f66b88b1fb1fc057a7fab732f8fcdf6c604410e7ed44ee6dad4
|
File details
Details for the file altrepo_hash-0.1.1-py3-none-any.whl.
File metadata
- Download URL: altrepo_hash-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.0 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 |
484b9716fe9d68d60a8502559ad17d8394eda48aa467c79fcc0320ee18c80b95
|
|
| MD5 |
13901f61e1be0e1d8db1fe72f6099359
|
|
| BLAKE2b-256 |
7f1a8c663b9d203d65bb33196ccc0b3b0751cc4247d4b7e786ebda86491b6ef2
|