This repository provides Python bindings for the BLAKE3 cryptographic hash function, using the official Rust implementation via PyO3. It exposes a single `blake3` class that mimics the Python `hashlib` API, supporting incremental hashing, keyed hashing, key derivation, extendable output (XOF), multithreading via Rayon, and memory-mapped file hashing. The core implementation is in `src/lib.rs`, which demonstrates careful handling of Python buffer protocol types (signed/unsigned bytes), GIL release for long operations, and interior mutability with `Mutex` for thread safety. An experimental C implementation in `c_impl/` provides a fallback for platforms without Rust support. The package is published on PyPI as `blake3` and includes comprehensive test vectors, type stubs, and CI for multiple platforms and Python versions (3.8 to 3.14, including free-threaded).
Collision is a desktop application for generating and verifying cryptographic hashes of files. Built with Crystal, GTK 4, and libadwaita, it provides a clean GUI interface to calculate MD5, SHA-1, SHA-256, SHA-512, Blake3, CRC32, and Adler32 hashes. The application features concurrent hash calculation using Crystal's fiber system, a Nautilus extension for file manager integration, and proper handling of Flatpak sandboxed environments. It follows a modular architecture with separate concerns for UI, core functionality, and application logic.