is-password-pwned
Check password against pwnedpasswords.com using k-anonimity model
See Searching pwned passwords by range.
Caches all found hashes in LRU cache.
Runs in node and modern browsers.
CLI
For using from the command line
$ npm i -g is-password-pwned
$ pwned
API
constructor
Parameters
-
size
Number size of lru cache (optional, default10000
)
Examples
import Pwnd from 'is-password-pwned'
const pwnd = new Pwnd()
const num = await pwnd.get('nutella')
//> num = 20833
get
get password from lru cache or request it from pwnedpasswords.com
if num === undefined
password hash could not be found in pwnedpasswords.com
Parameters
-
password
String password to verify
Returns await {Number} num - number of found hashes
Installation
Requires nodejs.
$ npm install is-password-pwned
Tests
$ npm test
License
Unlicense https://unlicense.org