pwned_password.cr
pwned_password - Calls HIBP API to check whether password was listed in a breach
Implements API v2 of Troy Hunt's HIBP to check whether a given password has been exposed in a breach.
https://haveibeenpwned.com/API/v2#PwnedPasswords
Installation
- Add the dependency to your
shard.yml
:
dependencies:
pwned_password:
github: anamba/pwned_password.cr
- Run
shards install
Usage
require "pwned_password_check"
PwnedPassword.search("correct horse battery staple") # -> 2 (found in 2 breaches)
PwnedPassword.search("f7Yr,f9dffF?eKeDpjepGwcc") # -> nil (not found)
Contributing
- Fork it (https://github.com/anamba/pwned_password/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Aaron Namba - creator and maintainer
Repository
pwned_password.cr
Owner
Statistic
- 6
- 0
- 0
- 0
- 0
- about 4 years ago
- December 5, 2018
License
MIT License
Links
Synced at
Thu, 08 May 2025 17:56:43 GMT
Languages