alvra / passleak

Async Rust API for Have I Been Pwned

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PassLeak

unsafe forbidden

Interface to the database of breached passwords provided by "Have I Been Pwned".

Features

  • Async using tokio and reqwest.
  • Brotli compression for reduced data usage.
  • Password hash prefix leak prevention by padding responses.
  • Constant time base16 encoding and password suffix comparison to prevent any timing atacks.

Example

use passleak::Api;

let api = Api::new();

// count the number of known breache
let breaches = api.count_breaches("secret").await.expect("api error");
assert!(breaches > 0);

// only check if any breaches are known
let is_breached = api.is_breached("secret").await.expect("api error");
assert!(is_breached);

Documentation

Documentation

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Async Rust API for Have I Been Pwned

License:Apache License 2.0


Languages

Language:Rust 100.0%