#passwords #haveibeenpwned #breach

pwchecker-rs

A library that consumes the pwned passwords API from haveibeenpwned.com

6 releases

0.1.5 Apr 26, 2021
0.1.4 Apr 26, 2021
0.1.0 Mar 23, 2021

#3 in #haveibeenpwned

22 downloads per month

Custom license

6KB

pwchecker-rs

pwchecker-rs exports a single function check_for_pwnage that takes a string a returns results from haveibeenpwned.com.

The returned value is a Result<Passwd, Error>, the Passwd struct has the public fields text which contains the password, and times_pwned which contains the number of times the password has been pwned.


lib.rs:

pwchecker_rs

pwchecker_rs allows you to conveniently query the haveibeenpwned.com api so you can check whether or not a password has been involved in a data breach.

Examples

#
let res = pwchecker_rs::check_for_pwnage("helloworld")?;

assert!(res.times_pwned > 0);
#

Dependencies

~7–19MB
~257K SLoC