Cryptography

hashlib — Secure hashes and message digests

Source code: Lib/hashlib.py

secrets — Generate secure random numbers for managing secrets

Source code: Lib/secrets.py

hmac — Keyed-Hashing for Message Authentication

Source code: Lib/hmac.py