BLAKE3 Hash Function

1.0.8 · active · verified Thu Apr 09

blake3-py provides high-performance Python bindings for the BLAKE3 cryptographic hash function, implemented in Rust. It offers a fast, secure, and modern hashing algorithm. The current version is 1.0.8, with releases typically driven by updates to the underlying Rust `blake3` crate, PyO3, or support for new Python versions.

Warnings

Install

Imports

Quickstart

Demonstrates both one-shot hashing of a complete data block and incremental hashing for streaming data.

import blake3

# One-shot hashing
data = b"Hello, BLAKE3!"
hash_result = blake3.blake3(data).hexdigest()
print(f"One-shot hash: {hash_result}")

# Incremental hashing
hasher = blake3.Hasher()
hasher.update(b"First part. ")
hasher.update(b"Second part.")
incremental_hash = hasher.finalize().hexdigest()
print(f"Incremental hash: {incremental_hash}")

view raw JSON →