https://github.com/pthm/hibp-checker
Anonymously check a given password against the haveibeenpwned.com database
https://github.com/pthm/hibp-checker
Last synced: 8 months ago
JSON representation
Anonymously check a given password against the haveibeenpwned.com database
- Host: GitHub
- URL: https://github.com/pthm/hibp-checker
- Owner: pthm
- License: mit
- Created: 2018-02-21T23:28:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-22T11:28:24.000Z (about 8 years ago)
- Last Synced: 2025-09-01T19:21:57.180Z (10 months ago)
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/hibp-checker
- Size: 6.84 KB
- Stars: 16
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hibp-checker
Anonymously query the haveibeenpwned.com API to fetch the number of times a
password has appeard in breached data sets using [K-anonymity](https://en.wikipedia.org/wiki/K-anonymity)
## Installation
```bash
npm install --save hibp-checker
```
## Usage
### API
```javascript
const checkPassword = require('hibp-checker');
const breachCount = await checkPassword('hunter2');
console.log(`Breached ${breachCount} times`);
```
### Command Line
```
> hibp-checker
Enter password to check: *********
Password frequency: 123
```
## Reading
- [HaveIBeenPwned API Docs](https://haveibeenpwned.com/API/v2#SearchingPwnedPasswordsByRange)
- [Troy Hunt's Blog Post](https://www.troyhunt.com/ive-just-launched-pwned-passwords-version-2/)