Expand description

Usage:

use checkpwn_lib::{Password, check_password, check_account, CheckpwnError};

let password = Password::new("qwerty")?;
check_password(&password);


check_account("your_account", "your_api_key");

Structs

Password is a wrapper type for a password that is checked at HIBP. It contains an opaque Debug impl, to avoid the SHA1 hash of the password to leak.

Enums

Errors related to checking passwords and accounts.

Constants

The checkpwn UserAgent sent to HIBP.

Functions

Check account, on both account and paste databases, using a given API key. Before sending a request, the thread sleeps for 1600 millis. HIBP limits at 1500. Returns Ok(bool), bool indicating whether the account is breached or not. Err() is returned if an error occurred during the check.

Check password. Returns Ok(bool), bool indicating whether the password is breached or not. Err() is returned if an error occurred during the check.