# Storing Passwords Safely: Hashing with pwdlib

An API never stores a password, plain or encrypted, only a slow, salted, one-way hash of it made with Argon2 through pwdlib's PasswordHash.recommended(), and it checks each sign-in attempt with verify.

![Cheat sheet: Storing Passwords Safely: Hashing with pwdlib](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/c2ba257de08b4a008bfa779d4f71e9cc.webp)

- Category: FastAPI
- Level: Journeyman
- Tags: Argon2, bcrypt, Encryption, fastapi, Hashing, rest-api, Salt
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/fastapi-auth-passwords-and-hashing-cheat-sheet
