← Back to Dashboard

HaveIBeenPwned

SecurityActiveFreeAuth: NoneDoc: HTML
Visit Website ↗

Description

Passwords which have previously been exposed in data breaches

✨ AI Summary

Checks if passwords have been exposed in data breaches using the k-Anonymity model.

Code Example

import hashlib
import requests

# To check a password, compute its SHA-1 hash and take the first 5 characters.
password = "your_secret_password"
sha1_hash = hashlib.sha1(password.encode('utf-8')).hexdigest().upper()
prefix = sha1_hash[:5]

url = f"https://api.pwnedpasswords.com/range/{prefix}"
response = requests.get(url)

# The response contains SHA-1 suffixes and counts of breaches.
# You then compare the full SHA-1 hash suffix against these.
print(response.text)

Live Health Metrics

Last 50 checks (10 min intervals)