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.
For using from the command line
$ npm i -g is-password-pwned
$ pwned
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 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
Requires nodejs.
$ npm install is-password-pwned
$ npm test
Unlicense https://unlicense.org