Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Zozi96/hash-forge/llms.txt

Use this file to discover all available pages before exploring further.

Hash Forge gives Python developers a single, consistent interface for password hashing and data verification across a wide range of secure algorithms — from Argon2 and bcrypt to PBKDF2, Scrypt, Blake2/3, SHA-3, and more. It handles algorithm routing, rehash detection, and on-login migration automatically, so you can focus on your application rather than cryptography plumbing.

Installation

Install Hash Forge and its optional algorithm extras via pip in under a minute.

Quickstart

Hash and verify your first password in five lines of Python.

HashManager Guide

Learn every method on the core HashManager class with real-world examples.

API Reference

Full type signatures and parameter docs for every public class and method.

Why Hash Forge?

Hash Forge was built around three principles: security by default, simplicity of use, and painless migration.

12 Algorithms

Argon2, bcrypt, bcrypt-SHA256, PBKDF2-SHA256, PBKDF2-SHA1, Scrypt, Blake2, Blake3, SHA-3 256/512, RIPEMD-160, and Whirlpool.

Async First

Non-blocking hash_async, verify_async, and hash_many_async via a thread-pool executor — drop it straight into FastAPI or any async framework.

Safe Migrations

verify_and_update and rotate handle on-login rehashing transparently — no one-off migration scripts required.

Get Up and Running

1

Install the package

pip install hash-forge
# Add extras for optional algorithms
pip install "hash-forge[argon2,bcrypt]"
2

Create a HashManager

from hash_forge import HashManager

manager = HashManager.from_algorithms("argon2", "pbkdf2_sha256")
3

Hash and verify

hashed = manager.hash("my_secure_password")
assert manager.verify("my_secure_password", hashed)
4

Migrate hashes automatically

is_valid, new_hash = manager.verify_and_update("password", old_hash)
if new_hash:
    # Store new_hash — the password was rehashed with the preferred algorithm
    save_to_db(new_hash)

Explore the Docs

Builder Pattern

Compose a multi-algorithm manager with a fluent, chainable API.

Password Policy

Apply recommended, FIPS-compliant, or custom hashing policies in one line.

Async Usage

Integrate Hash Forge with FastAPI, Django Channels, or any asyncio app.

Hash Migration

Upgrade existing hashes incrementally, on every user login — no downtime.

Algorithm Overview

Compare all supported algorithms by category, security level, and use case.

Configuration

Load algorithm parameters from environment variables, JSON files, or code.

Build docs developers (and LLMs) love