[−][src]Function hibp::check
pub async fn check(password: String) -> Result<(), Error>
Checks if a password have been pwned.
Returns a Ok if the password is not known and an Error otherwise.
The error will contain the number of time the password is present
in the HaveIBeenPwned database
Arguments
password
- The password to check
Example
use hibp::check; #[tokio::main] async fn main() { let checked = check("test".to_string()).await; assert!(checked.is_err()); }